读书人

诺西的笔试题程序请大家看看有什么有

发布时间: 2013-04-20 19:43:01 作者: rapoo

诺西的笔试题程序,,,请大家看看有什么问题。。。
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++);
}
}

读书人网 >C语言

热点推荐