![](https://lstatic.shangxueba.com/sxbzda/h5/images/m_q_title.png)
[主观题]
以下程序企图把从终端输入的字符输出到名为abc.txt 的文件中,直到从终端读入字符#号时结束输入和
输出操作,但程序有错。 #include <stdio.h> main() { FILE *fout; char ch; fout=fopen('abc.txt','w'); ch=fgetc(stdin); while(ch!='#') { fputc(ch,fout); ch =fgetc(stdin); } fclose(fout); } 出错的原因是
A.函数fopen调用形式有误
B.输入文件没有关闭
C.函数fgetc调用形式有误
D.文件指针stdin没有定义
![](https://lstatic.shangxueba.com/sxbzda/h5/images/tips_org.png)