填空题

下面程序的输出结果是 【13】 。
char b[]="ABCD";
main()
char *chp;
for (chp=b;*chp ;chp +=2) printf("%s",chp);
printf("\n");

【参考答案】

ABCDCD
<上一题 目录 下一题>
热门 试题

填空题
若输入tear、test、arj,则下列程序的运行结果为 【9】 。main() char*strl[20],*str2[20],*str3[20]; char swap(); scanf( %s ,str1); scanf( %s ,str2); scanf( %s ,str3); if (strcmp(str1,str2)>0)swap(str1,str2); if (strcmp(str1,str3)>0)swap(str1,str3); if (strcmp(str2,str3)>0)swap(str2,str3); printf( %s %s %s n ,str1,str2,str3);char swap(p1,p2)char*p1,*p2; char*p[20]; strcpy(p,p1);strcpy(p1,p2);strcpy(p2,p);
填空题
下列程序段的输出结果是 【8】 。int n=’c’;switch(n++) default:printf( error );break; case ’a’:case ’A’:case ’b’:case ’B’:printf( good );break; case ’c’:case ’C’:printf( pass ); case ’d’:case ’D’:printf( warn );
相关试题
  • 若有以下定义和语句,sizeof(a)的值是 ...