填空題
下面的程序用變量count統(tǒng)計(jì)文件letter.dat中字符的個(gè)數(shù)。請(qǐng)寫(xiě)出程序的橫線處應(yīng)該填入的內(nèi)容。()
#include
main( )
{ FILE *fp;
long count=0;
if((fp=fopen((“letter.dat”, ))==NULL){
printf((“Cannot open file!\n”);
exit(0);
}
while(!feof(fp)){
;
count++; }
printf((“count=%d\n”,count);
fclose(fp);
}