有下面的程序段:()chara[3],b[]=“China”;a=b;printf(“%s”,a);
A. 运行后将输出China
B. 运行后将输出Ch
C. 运行后将输出Chi
D. 编译出错
查看答案
下面程序的运行结果是:()。charc[5]={‘a’,‘b’,‘\0’,‘c’,‘\0’};printf(“%s”,c);
A. ab
B. abc
C. abc\0
D. ab\0c\0
下面程序的运行结果是:()。main(){int a[][3]={1,2,3,4,5,6};printf("%d",a[1][1]);}
A. 3
B. 4
C. 5
D. 6
下面程序的运行结果是:()。main(){char s1[20]="Good!";char s2[15]="AB";printf("%d",strlen(strcpy(s1,s2)));}
A. 20
B. 15
C. 5
D. 2
下面程序的运行结果是:()。main(){int x[]={22,33,44,55,66,77,88};int k,y=0;for (k=1;k<=4;k++)if (x[k]%2==1)y++;printf("%d",y);}
A. 0
B. 1
C. 2
D. 3