下面程序从键盘输入字符存放到文件中,用#结束输入。存放字符的文件名也由键盘输入。请填空。 #include
main() { FILE *fp; char ch, fname[10]; printf("Input name of file\n"); gets(fname); if((fp=fopen(___1___,"w"))==NULL) { fprintf("cannot open file\n"); exit(0); } printf("Enter character:\n"); while(___2___!='#') fputc(ch,___ 3___); fclose(fp); }