November 16th, 2013, 04:10 PM
Can anyone shed some light on what a stream is as it applies to i/o in C? I am having trouble getting my arms around this construct.
November 16th, 2013, 04:28 PM
Basically, a stream would be a source of data that has no definite size and the elements of which could arrive at any time. Stream I/O would process such a data source.
In contrast. block I/O would read data in fixed-sized groupings called a "block"; blocks typically range from 128 bytes to 16 KB or more. All the data is present when you read it in or write it out. A typical example would be a disk file, which in the perspective of the disk involves the reading and writing of entire sectors at a time -- your program might only read one byte from a disk file, but that requires the reading in of the entire disk sector that that one byte is contained in.
After you have read that Wikipedia article and followed some of the links it provides (including some of the "See also" links), if you still have questions or difficulties, then come back with those specific questions. That'll garner you better answers than broad general questions.