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 (15641616)
“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 (18091892)
“In contrast to the flux and muddle of life, art is clarity and enduring presence. In the stream of life, few things are perceived clearly because few things stay put. Every mood or emotion is mixed or diluted by contrary and extraneous elements. The clarity of artthe precise evocation of mood in the novel, or of summer twilight in a paintingis like waking to a bright landscape after a long fitful slumber, or the fragrance of chicken soup after a week of head cold.”
—Yi-Fu Tuan (b. 1930)