#includevoid main(){int aa[4][4]={{1,2,3,4},{5,6,7,8},{3,9,10,2},{4,2,9,6}};#includevoid main(){int aa[4][4]={{1,2,3,4},{5,6,7,8},{3,9,10,2},{4,2,9,6}};int i,s=o;for(i=o;i,4;i++)s+=aa[i][2];printf("%d\n",s);的结果是什么

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/17 04:34:08
#includevoidmain(){intaa[4][4]={{1,2,3,4},{5,6,7,8},{3,9,10,2},{4,2,9,6}};#includevoidmain(){intaa[4

#includevoid main(){int aa[4][4]={{1,2,3,4},{5,6,7,8},{3,9,10,2},{4,2,9,6}};#includevoid main(){int aa[4][4]={{1,2,3,4},{5,6,7,8},{3,9,10,2},{4,2,9,6}};int i,s=o;for(i=o;i,4;i++)s+=aa[i][2];printf("%d\n",s);的结果是什么
#includevoid main(){int aa[4][4]={{1,2,3,4},{5,6,7,8},{3,9,10,2},{4,2,9,6}};
#include
void main()
{int aa[4][4]={{1,2,3,4},{5,6,7,8},{3,9,10,2},{4,2,9,6}};
int i,s=o;
for(i=o;i,4;i++)s+=aa[i][2];
printf("%d\n",s);
的结果是什么

#includevoid main(){int aa[4][4]={{1,2,3,4},{5,6,7,8},{3,9,10,2},{4,2,9,6}};#includevoid main(){int aa[4][4]={{1,2,3,4},{5,6,7,8},{3,9,10,2},{4,2,9,6}};int i,s=o;for(i=o;i,4;i++)s+=aa[i][2];printf("%d\n",s);的结果是什么
第一次运行i=2,sum[&aa[2]]就把aa[2]当做首地址传给函数sum,然后sum函数中的a[0],a[1]分别代表了aa[2],aa[3],所以第一次完毕以后aa[2]=aa[3]=4;然而aa[0]并没有改变
然后第二次运行i=1;同样将4传给了aa[1]=4;
然后第三次i=0,将aa[0]赋值为4.所以结果应该是4
希望对你能有所帮助.