有以下程序#includeint main(){int i,j=0;char a[]="How are you!",b[10]={0};for(i=0;a[i];i++)if(a[i]==' ') b[j++]=a[i-1];printf("%s\n",b);return 0;}
A. Howareyou!
B. ay
C. we
D. we!
查看答案
若有定义:int a[]={1,2,3,4,5,6,7,8,9,10};,则a[a[5]-a[7]/a[1]]的值是
A. 2
B. 4
C. 3
D. 10
有以下程序:#includeint main(){int b[3][3]={0,1,2,0,1,2,0,1,2},i,j,t=1;for(i=0;i<3;i++)for(j=i;j<=i;j++) t+=b[i][b[j][i]];printf("%d\n",t);return 0;}程序运行后的输出结果是
A. 1
B. 3
C. 4
D. 9
有以下程序:#includeint main(){int x[3][2]={0},i;for(i=0;i<3;i++)scanf("%d",x[i]);printf("%3d%3d%3d\n",x[0][0],x[0][1],x[1][0]);return 0;}若运行时输入:2 4 6<回车>,则输出结果为
A. 2 0 4
B. 2 0 0
C. 2 4 0
D. 2 4 6
有以下程序:#includeint main(){int i,t[][3]={9,8,7,6,5,4,3,2,1};for(i=0;i<3;i++)printf("%d ",t[2-i][i]);return 0;}程序执行后的输出结果是
A. 3 5 7
B. 7 5 3
C. 3 6 9
D. 7 5 1