填空题 下列程序是处理C盘根目录下的a.txt文件,统计该文件中字符的个数。请填空,使程序完整。 #include <stdio.h> main() { FILE*fp;char ch; long num=0; if(______) { printf("Can't open file !/n"); exit(0); } while(______) { ch=fgetc(fp); ______; } printf("%d",num); fclose(fp); }
  • 1、
【正确答案】 1、(fp=fopen("c://a.txt"),"r")==NULL , !feof (fp) ,fputc (ch,fp);    
【答案解析】