若有定义“charstr1[30],str2[30];”,则输出较大字符串的正确语句是()。
A. if(strcmp(str1,str2))printf("%s",str1);
B. if(strl1>str2)printf("%s",str1);
C. if(strcmp(str1,str2)>0)printf("%s",str1);else printf("%s",str2);
D. if(strcmp(str1)>strcmp(str2))printf("%s",str1);
下列程序段的输出结果是()。intaa[4][4]={{1,2,3,4},{5,6,7,8},{3,9,10,2},{4,2,9,6}};inti,s=0;for(i=0;i<4;i++)s+=aa[i][1];printf("%d\n",s);
A. 11
B. 19
C. 13
D. 20
下列程序段的输出结果是()。charstr[15]="hello!";printf("%d\n",strlen(str));
A. 15
B. 14
C. 7
D. 6
有以下程序段,当输入为happy!时,程序运行后输出结果是()。charstr[14]={"Iam"};strcat(str,"sad!");scanf("%s",str);printf("%s",str);
A. Iamsad!
B. happy!
C. Iamhappy!
D. happy!sad!