诺西的笔试题程序,,,请大家看看有什么问题。。。
6. The following codes calculate the dot product of A and B and save the result to Res. Please point out the possible problems of the codes(10 points)
int DotProduct(const short *A,int sizeA,const short *B int sizeB, const short *Res)
{
int I;/* loop counters*/
for(i=0;i<sizeA;i++)
{
*Res = (*A++) * (*B++);
}
}