You first read about formatted I/O in Chapter 5, “Console I/O,” where you learned to direct output to the screen and retrieve input from the keyboard. These interfaces with the outside world are called streams. A stream is a sequential source of data and can be read-only or read-write. The operating system is responsible for connecting the streams to the actual hardware (screen, printer, hard disk drive, keyboard, and so on).
In most C language implementations, the operating system-specific code is written in such a way as to treat files and streams in roughly the same manner. For example, you have already seen that the console can be referred to as:
|stdin||Standard input stream|
|stdout||Standard output stream|
These are essentially ...