求助:考试题,哪位好心人帮帮我.
求下面两题的执行结果:
1. main()
{ int aa[]={1,2,3,4,5,6,7,8,9,10},s1=0,s2=0,i;
for(i=0;i<10;i++)
{ s1=s1+aa[i];
s2=s2+aa[i]*aa[i];
}
printf(“s1=%d\ts2=%d\n”,s1,s2);
}
2. main()
{ char str[]=”computer”;
int i;
for(i=0;i<8;i++)
printf(“%c”,str[i]);
printf(“\n”);
printf(“%s”, str);
}