The getc macro returns the next character from a specified file.
Format
#include <stdio.h>
int getc (FILE *file_ptr);
Argument
- file_ptr
- A pointer to the file to be accessed.
Description
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 in this section.
Return Values
n | The returned character. |
EOF | Indicates the end-of-file or an
error. |
Previous Page | Next Page | Table of Contents | Index