问答题
#include<stdio.h> #include%<string.h> main() {char p1[10]="abc",p2[10]="ABC",str[50]="xyz": strcpy(str+2,strcat(p1,p2)): printf("%s\n",str); }
【参考答案】
xyabcABC[解析] #include<stdio.h> #include<string.h> main() ......
(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)
点击查看答案
<上一题
目录
下一题>
热门
试题
填空题
下面程序由终端键盘输入一个文件名。然后把从终端键盘输入的字符依次存放到该文件中,用#作为结束输入的标志。 #include<stdio.h> #include main() {FILE *fp; char ch,fname[10]; printf( Please input the file name. n ); gets(fname); if((fp=______)==NULL) *第一空* {printf( ()pen it error n );______;} *第二空* else(printf( Enter the content n ); while((ch=getchar())!=’#’) ______; *第三空* } fclose(fp); }
点击查看答案&解析
问答题
#include<stdio.h> #include<string.h> main() {int y=9; for(;y>0;y--) {if(y%03==0) {printf( %d ,--y);continue;} printf( %d ,--y); } }
点击查看答案
相关试题
根据Fibonacci数列公式: 计算并输出前2...
输入2个整数,输出它们的最小公倍数和最大...