fflush
- Updated2023-02-21
- 1 minute(s) read
fflush
int fflush (FILE *stream);
Purpose
Flushes the I/O buffer of the specified stream. If the specified stream is open for output (write or append) or if it is open for update (read/write or read/append) and the most recent I/O operation was not an input operation, then this function writes any unwritten data to that stream. If the specified stream is open for input (read), this function clears the buffer contents of the stream.
Parameters
Input | ||||
Name | Type | Description | ||
stream | FILE * |
Specifies the I/O stream that will have its buffer contents flushed. A
flush occurs only if this stream is open for output or update
(read/write or read/append), and the most recent operation is not an
input operation. If the specified stream is open for input (read), this
function clears the buffer contents of the stream.
|
Return Value
Name | Type | Description |
status | int | Contains the returned status of the function. On success, fflush returns 0. If an error occurs, fflush returns EOF and sets errno to a nonzero value. |
Additional Information
Library: ANSI C Library
Include file: ansi_c.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later