We encountered the FILE structure in Chapter 21, Exploring Formatted Input. This structure consists of information needed to control a stream. It holds the following:
- A current position indicator: This is relevant if the device has a beginning and an end, such as a file.
- An End-of-File(EOF)indicator: To show whether we are at the end of the file or not.
- An error indicator: To show whether an error occurred.
- A data buffer: When in buffer mode, data is temporarily stored here.
- A buffer state: Indicates what kind of buffering is in use.
- I/O mode: Indicates whether this is an input, output, or update stream. An update stream performs both input and output; it requires advanced file manipulations to use properly.
- Binary or text mode: Is the stream a text stream or a binary stream?
- An I/O device identifier: A platform-specific identifier...