[填空题] 以下程序用来统计文件字符的个数,请填空。
#include<stdio.h>
#include<string>
void main()
FILE *fp;long num=0;
if ((fp=fopen("fname.dat"," r"))==NULL)
printf("Open error");
exit(0),
while(______)
fgetc(fp);num++;
printf("num=%1d",num-1);
fclose(fp);
参考答案:
fgetc(fp)!=EOF或!feof(fp)问题解析:
解析无

![[填空题] 以下程序用来统计文件字符的个数,请填空。 #include<stdio.h> #include<string> void main() FILE *fp;long num=0; [填空题] 以下程序用来统计文件字符的个数,请填空。 #include<stdio.h> #include<string> void main() FILE *fp;long num=0;](http://www.mshxw.com/aiimages/31/255968.png)
