The getc function

Name

getc -- 

Synopsis

#include <stdio.h>

int getc (FILE *stream );

Description

The getc function is equivalent to fgetc, except that if it is implemented as a macro, it may evaluate stream more than once, so the argument should never be an expression with side effects.

Returns

The getc function returns the next character from the input stream pointed to by stream. If the stream is at end-of-file, the end-of-file indicator for the stream is set and fgetc returns EOF. If a read error occurs, the error indicator for the stream is set and getc returns EOF.

Implementation Notes

The getc function