fgetc()

This is a file I/O function, also hardware dependent. It is not implemented in this Compiler.

Syntax
  #include <stdio.h>

  
  int fgetc(FILE *f);

  
Description

fgetc() reads the next character from file f.

Note: If file f was opened as a text file, fgetc() reads the end-of-line character combination as one '\n' character.
Return

fgetc() reads the character as an integer in the range from 0 to 255. If a read error occurs, fgetc() returns EOF and sets the file's error flag, so that a subsequent call to ferror() returns a non-zero value. If an attempt is made to read beyond the end of the file, fgetc() also returns EOF, but sets the end-of-file flag instead of the error flag so that feof() returns EOF, but ferror() returns zero.

See also

fgets()

fopen()

fread()

fscanf()

getc()