getc Function (Macro)

stdio.h

#define getc fgetc

Gets a character from a stream.

getc gets the next character on the given input stream (associated with the structure pointed to by stream), and increments the stream's file pointer to point to the next character. If the file is opened in "text" mode (see fopen), a character after '\r' will be swallowed during reading (to skip over the "command byte" at the begining of the each line in a TEXT variable).

On success, getc returns the character read, after converting it to an integer without sign extension. On error (usually end-of-file), it returns EOF.


Uses: fgetc