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:

    When cats run home and light is come,
    And dew is cold upon the ground,
    And the far-off stream is dumb,
    And the whirring sail goes round,
    And the whirring sail goes round;
    Alone and warming his five wits,
    The white owl in the belfry sits.
    Alfred Tennyson (1809–1892)

    Married love is a stream that, after a certain length of time, sinks into the earth and flows underground. Something is there, but one does not know what. Only the vegetation shows that there is still water.
    Gerald Branan (1894–1987)

    Man is in part divine,
    A troubled stream from a pure source;
    And Man in portions can foresee
    His own funereal destiny;
    George Gordon Noel Byron (1788–1824)