有以下程序:#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
查看答案
有以下程序:#includeint main(){int a[4][4]={{1,4,3,2},{8,6,5,7},{3,7,2,5},{4,8,6,1}},i,k,t;for(i=0;i<3;i++)for(k=i+1;k<4;k++)if(a[i][i]
A. 1,1,2,6,
B. 6,2,1,1,
C. 2,3,4,6,
D. 6,4,3,2,
有以下程序(strcat函数用以连接两个字符串):#include#includeint main(){char a[20]="ABCD\0EFG\0",b[]="IJK";strcat(a,b);printf("%s\n",a);return 0;}程序运行后的输出结果是
A. IJK
B. ABCDE\0FG\0IJK
C. ABCDIJK
D. EFGIJK
有以下程序:#includeint main(){char s[]={"012xy"};int i,n=0;for(i=0;s[i]!=0;i++)if(s[i]>='a' && s[i]<='z') n++;printf("%d\n",n);return 0;}程序运行后的输出结果是
A. 0
B. 2
C. 3
D. 5
若有以下程序:#includeint main(){char a[20],b[]="The sky is blue."; int i;for(i=0;i<7;i++) scanf("%c",&b[i]);gets(a);printf("%s%s\n",a,b);return 0;}执行时若输入:(其中表示回车符)Fig flower is red.则输出结果是
A. wer is red.Fig flo is blue.
B. wer is red.Fig flo
C. wer is red.The sky is blue.
D. Fig flower is red.The sky is blue.