C feof

C feof function is used to determine if the end of the file (stream), specified has been reached or not. This function keeps on searching the end of file (eof) in your file program.

int feof(FILE *stream)
while (!feof(fileName)) {
    printf("%s", strr);
    fgets(st, 50, fileName);
  • C feof function returns true in case end of file is reached, otherwise it's return false.

Scroll Back to Top