Answer the following statements true (T) or false (F)

1. A stream is a flow of data into or out of your program.
2. An input stream is a stream of data flowing from your program, either to a file, or to the keyboard.
3. An output stream is a stream of data flowing from your program, to a file, a device of some sort such as the screen.
4. cin is an output stream object of type ostream.
5. When a program sends data from itself to the outside, say to a file or the screen, we say it is writing the data on the file or to the screen.


1. True
2. False
From the viewpoint of the program, data that enters a program is an input stream. An input stream flows from some place outside the program, either a file, some device such as the keyboard, the mouse, or a scanner, into your program.
3. True
From the viewpoint of the program, data that leaves is an output stream. An output stream flows from your program to somewhere outside the program, either to a file, or to some device such as the screen.
4. False
cin has type istream object, i.e., it is an input stream.
5. True
Descriptions of reading or writing of files, are always from the point of view of the program. A program reads or takes data (from a file), and it writes or sends data (to a file).

Computer Science & Information Technology

You might also like to view...

As you work, the History panel logs each command that is performed as a new ____________________.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

To allow a user to make a selection from a predefined list on a Web form, use a(n) ____________________ object.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

When you ____ a window, it occupies the enter screen and cannot be confused with other open windows.?

A. ?restore B. ?index C. ?maximize D. ?shake

Computer Science & Information Technology

What command can be used to scan for Windows installations not stored in the BCD?

A. bootrec /scanOS B. bootrec /fixmbr C. bootrec /fixboot D. bcdedit

Computer Science & Information Technology