Int main ()
{
The FILE * fp=fopen (" d:/Cpp Exercise/FILE. TXT ", "r +");
Char buf [255] [255].
Int CNT=0;
//printf (" % d \ n ", fp -> _file);
for(int i=0; ! The feof (fp); I++) {
The fgets (buf [I], 255, fp);
Printf (" % s ", buf [I]);
//printf (" % d \ n ", fp -> _file);
}
//printf (" % d \ n ", fp -> _file);
The fclose (fp);
Fp=fopen (" d:/Cpp Exercise/file. TXT ", "r +");
for(int i=0; ! The feof (fp); I++) {
for(int j=0; Buf [I] [j].='\ n'; J++) {
If (fscanf (fp, "% s", buf [0])==1) {
Cnt++;
}
}
}
Printf (" \ n \ n \ n % d ", CNT);
}