[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  FEOF

  .  Summary

  feof(int <fh>);

  .  Description

  The feof function determines if the file position for the open file
  represented by the file handle <fh> is at the end-of-file position.

  .  Return Value

  A non-zero (TRUE) value is returned if the file position is at the
  end of the file.

  .  Example

  int f, chr;
  f = fopen("test.dat", "r");
  while ((chr = fgetc(f)) != -1)    // print contents of file
   printc(chr);
  if (feof(f))
   prints("Reached end of file.");
  else
   prints("Error reading file");

See Also: ferror
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson