填空题
#include<stdio.h> int fun(char*s) {char*p=s; while(*p!=’\0’)p++; return(p-s);} main() {printf("%d\n",fun("hello world")); } 程序运行结果是:______
【参考答案】
K
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
以下程序运行时从键盘输入字符串ABCDE按回车键结束输入,使输入字符串中的A和B转换为字符#输出,其他字符输出为*。 #include stdio.h main() {char c:while((c=getchar())!=’ 0’) {switch(c) {case’A’: case’B’:putchar(’#’);break; default:putchar(’*’);} } } 错误:______ 改正:______
点击查看答案&解析
填空题
下面程序的功能是将字符串s中所有的字符a删除。请填空。 #include<stdio.h> void main() {char s[80]; int i,j=0; gets(s); for(i=0;s[i]!=’ 0’;i++) if(s[i]!=’a’)______; s[j]=’ 0’; puts(s);}
点击查看答案&解析
相关试题
⑧A
⑦DPTR
⑥A
⑤@DPTR
④#70H