logo - 题百科
找答案
首页
【简答题】
以下程序的功能是:从键盘上输入一个字符串,把该字符串中的小写字母转换为大写字母,输出到文件 test.txt 中,然后从该文件读出字符串并显示出来,请填空。 #include #include main() {FILE *fp; char str[100]; int i=0; if((fp=fopen("test.txt", __________ ))==NULL) { printf("can't open this file.\n");exit(0);} printf("input a string:\n"); gets(str); while(str[i]) {if(str[i]>='a'&&str[i]<='z') str[i]= __________ ; fputc(str[i],fp); i++; } fclose(fp); fp=fopen("test.txt", __________ ); fgets(str,100,fp); printf("%s\n",str); fclose(fp); }
参考答案:
登录免费查看参考答案
参考解析:
登录免费查看参考解析
知识点:
登录免费查看知识点
答题技巧:
登录免费查看答题技巧
被用于:
暂无被用于
..
刷刷题刷刷变学霸
.
刷刷题刷刷变学霸