C Programming/C Reference/stdio.h/fgetc
int fgetc(FILE *stream)
FILE *stream is an initialised pointer to a file.
If successful, fgetc returns a character from the file at it's current position. If unsuccessful, fgetc returns an error code. For text files (as opposed to binary files), the characters with values 25 and 26 (the Substitute character and the escape character) may render the input stream inoperable afterward, instead returning a single maximal value.
- -1: Bad argument: not integer
- -2: Bad argument: out of range
- -3: File was not open