In the following ‘C’ code

1.9 In the following ‘C’ code
{
FILE *f = fopen( fileName, "r");
fread(f);
if(????)
puts(“End of file reached”);
}
Which one of the following can replace the ???? in the code above to determine if the end of
a file has been reached?
A) f == EOF
B) feof( f )
C) eof( f )
D) f == NULL


Leave a Reply