VMS Help
CRTL, getc
*Conan The Librarian
|
Returns the next character from a specified file.
Format
#include <stdio.h>
int getc (FILE *file_ptr);
file_ptr
A pointer to the file to be accessed.
The getc macro returns the next byte from the input stream
specified by the file_ptr parameter and moves the file pointer,
if defined, ahead one byte in the input stream.
Since getc is a macro, a file pointer argument with side effects
(for example, getc (*f++)) might be evaluated incorrectly.
In such a case, use the fgetc function instead. See the fgetc
function.
See also getc_unlocked.
n The returned character.
EOF Indicates the end-of-file or an error.