All internal buffers associated with the stream are flushed: the content of any unwritten buffer is written and the content of any unread buffer is discarded.
Even if the call fails, the stream passed as parameter will no longer be associated with the file.
Parameters
- stream
- Pointer to a FILE object that specifies the stream to be closed.
Return Value
If the stream is successfully closed, a zero value is returned.On failure, EOF is returned.
Example
| 1 2 3 4 5 6 7 8 9 10 |
|
See also
| fopen | Open file (function) |
| fflush | Flush stream (function) |
