Exam 12: Advanced File Operations

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

The end-of-file marker is automatically written ________.

(Multiple Choice)
4.8/5
(33)

This data type can be used to create files and read information from them into memory.

(Multiple Choice)
4.9/5
(40)

An alternative to using the open member function is to use the file stream object declaration itself to open the file. Example: fstream DataFile("names.dat", ios::in | ios::out);

(True/False)
4.8/5
(29)

If a file already exists, you can open it with the flags ios::in | ios::out to preserve its contents.

(True/False)
5.0/5
(34)

This member function writes a single character to a file.

(Multiple Choice)
5.0/5
(43)

File output may be formatted the same way as console screen output.

(True/False)
4.8/5
(39)

Closing a file causes any unsaved information still held in the file buffer to be ________.

(Multiple Choice)
4.8/5
(34)

All stream objects have ________, which indicate the condition of the stream.

(Multiple Choice)
4.9/5
(41)

Which statement opens a file in such a way that information will only be written to its end?

(Multiple Choice)
4.8/5
(37)

This state bit is set when an attempted operation has failed.

(Multiple Choice)
4.8/5
(45)

When used by itself, this access flag causes a file's contents to be deleted if the file already exists.

(Multiple Choice)
4.8/5
(39)

ofstream, ifstream, and fstream are:

(Multiple Choice)
4.8/5
(37)

Outside of a C++ program, a file is identified by its ________. Inside a C++ program, a file is identified by a(n)________.

(Multiple Choice)
4.8/5
(37)

Data stored here disappears once the program stops running or the computer is powered down.

(Multiple Choice)
4.9/5
(38)

Only one file stream object can be declared per C++ program.

(True/False)
4.9/5
(35)

When passing a file stream object to a function, you should always pass it by reference.

(True/False)
5.0/5
(33)

When data is read from a file, it is automatically stored in a variable.

(True/False)
4.8/5
(41)

By default, files are opened in binary mode.

(True/False)
4.7/5
(28)
Showing 21 - 38 of 38
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)