<tt>int fgetc(FILE *stream)</tt>

Document: The C Standard Library

next int getchar(void)
up Input and Output: stdio.h
gif FILE *fopen(char *filenamechar *mode)

int fgetc(FILE *stream)

fgetc() reads the next sequential character (byte) from the open file identified by the file pointer stream. This character is converted into an int value, and is the return value from the function. However, if the end of file is encountered (the last character has already been read), or if any other error is encountered in reading, then the return value will be EOF, and errno will be set appropriately. In the case of a text file, the newline character '\n' should be interpreted as terminating a line.

Fri Mar 29 14:35:38 GMT 1996