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:

    I have ventured
    Like little wanton boys that swim on bladders,
    This many summers in a sea of glory,
    But far beyond my depth. My high-blown pride
    At length broke under me and now has left me,
    Weary and old with service, to the mercy
    Of a rude stream that must forever hide me.
    William Shakespeare (1564–1616)

    I don’t like to be idle; in fact, I often feel somewhat guilty unless there is some purpose to what I am doing. But spending a few hours—or a few days—in the woods, swamps or alongside a stream has never seemed to me a waste of time.... I derive special benefit from a period of solitude.
    Jimmy Carter (James Earl Carter, Jr.)

    This land is your land, this land is my land,
    From California to the New York Island.
    From the redwood forest to the Gulf Stream waters
    This land was made for you and me.
    Woody Guthrie (1912–1967)