1.
Which of the following is the state bit that is set when an attempted operation fails?
2.
When a file is opened, the file stream object's "read position" is
| at the beginning of the file |
| nonexistent until the programmer declares it |
| in the middle of the file |
3.
Which of the following is the member function that writes a single character to a file?
4.
Which of the following data types can be used to create files and read information from them into memory?
5.
Which of the following is the data type that can be used to create files, read data from them, and write data to them?
6.
All stream objects have ________ which indicate the position of the stream.
7.
ofstream, ifstream, and fstream are
8.
Data stored ________ disappears once the program stops running or the computer is powered down.
9.
What is TRUE about the following statement? out.open("values.dat", ios::app);
| If the file already exists, its contents are preserved and all output is written to the end of the file. |
| If the file already exists, it should be replaced with a new copy of values.dat. |
| If the file already exists, it can be opened but not modified. |
10.
Closing a file causes any unsaved information still held in the file buffer to be
| retained in the buffer for safekeeping |