主观

下面程序由终端键盘输入一个文件名。然后把从终端键盘输入的字符依次存放到该文件中,用#作为结束输入的标志。

#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);

}

参考答案
您可能感兴趣的试题
¥

订单号:

遇到问题请联系在线客服

订单号:

遇到问题请联系在线客服