Data File - Stream

A stream is a sequence of bytes. A stream is a general name given to a flow of data. Different streams are used to represent different kinds of data flow. Each stream is associated with a particular class,which contains member functions and definitions for dealing with that particular kind of data flow. The stream that supplies data to the program in known as input stream. It reads the data from the file and hands it over to the program. The stream that receives data from the program is known as output stream. It writes the received data to the file.Following figure illustrates it.

When the main function of your program is invoked, it already has three predefined streams open and available for use. These represent the "standard" input and output channels that have been established for the process.

Read more about this topic:  Data File

Famous quotes containing the word stream:

    So near along life’s stream are the fountains of innocence and youth making fertile its sandy margin; and the voyageur will do well to replenish his vessels often at these uncontaminated sources.
    Henry David Thoreau (1817–1862)

    Thou stately stream that with the swelling tide
    ‘Gainst London walls incessantly dost beat,
    Thou Thames, I say, where barge and boat doth ride,
    And snow-white swans do fish for needful meat:
    George Turberville (1821–1873)

    I confess my belief in the common man.... The man who is swimming against the stream knows the strength of it.... The man who is in the melee knows what blows are being struck and what blood is being drawn.
    Woodrow Wilson (1856–1924)