下面终端键盘输入一个文件名。然后把从终端键盘输入的字符依次存放到该文件中,用#作为结束输入的标志。 #include<stdio.h> #include<stdlib.h> 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); }