填空题

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