What does 'stream' mean in C?
c, file, stream, terminology
Solution
The people designing C wanted a uniform way of interfacing with different sources of sequential data, like files, sockets, keyboards, USB ports, printers or whatever.
So they designed one interface that could be applied to all of them. This interface uses properties that are common to all of them.
To make it easier to talk about the things that could be used through the interface they gave the things a generic name, streams.
The beauty of using the same interface is that the same code can be used to read from a file as from the keyboard or a socket.
Problem
I'm reading a section in 'C Primer Plus' which deals with files, streams and keyboard input. The author connects the concept of stream with files and defines stream as follows: Conceptually, the C program deals with a stream instead of directly with a file. A stream is an idealized flow of data to which the actual input or output is mapped. That means various kinds of input with differing properties are represented by streams with more uniform properties. The process of opening a file then becomes one of associating a stream with the file, and reading and writing take place via the stream What does the author mean by the bold sentence? And what is the connection between files and stream?