问题 填空题

#include"stdio.h"
main()
FILE*I=fp;char ch;
if((fp=fopen("test.txt","w"))==NULL)
printf("cannot open file\n");exit(0);
ch=getchar();
while(ch!=’$’)
fputc(ch,fp);putchar(ch);
ch=getchar();
fclose(*fp);

错误:______
改正:______

答案

参考答案:错误:fclose(*fp);
改正:将其修改为felose(fp);

解析: 关闭文件语句语法错误。

单项选择题
单项选择题