fgetc
- Updated2023-02-21
- 1 minute(s) read
fgetc
int fgetc (FILE *stream);
Purpose
Reads the next character from the specified input stream and advances the associated file position indicator. If successful, the function will return the character read; otherwise, the value EOF (-1) is returned.
Parameters
Input | ||
Name | Type | Description |
stream | FILE * | Contains a pointer to the input stream from which a character is read. |
Return Value
Name | Type | Description |
characterRead | int |
Contains the next character read from the input stream pointed to by
stream. Two cases cause the function to return EOF (-1):
|
Additional Information
Library: ANSI C Library
Include file: ansi_c.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later
Example
Refer to dotnet\Timer\timer.cws for an example of using the fgetc function.