Exam 12: Advanced File Operations

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

When you store data in a variable, it is automatically saved in a file.

Free
(True/False)
4.9/5
(29)
Correct Answer:
Verified

False

Which of the following statements opens the file info.txt for both input and output?

Free
(Multiple Choice)
4.8/5
(35)
Correct Answer:
Verified

D

In order, the three-step process of using a file in a C++ program involves:

Free
(Multiple Choice)
5.0/5
(41)
Correct Answer:
Verified

C

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

(Multiple Choice)
4.7/5
(40)

The _________ marker is the character that marks the end of a file, and is automatically written when the file is closed.

(Multiple Choice)
4.8/5
(28)

This data type can be used to create files and write information to them but cannot be used to read information from them.

(Multiple Choice)
4.9/5
(36)

When used by itself, the ios::app flag causes the file's existing contents to be deleted if the file already exists.

(True/False)
4.8/5
(37)

The ios::out flag causes the file's existing contents to be deleted if the file already exists.

(True/False)
4.9/5
(39)

ofstream, ifstream, and fstream are:

(Multiple Choice)
4.8/5
(39)

To write to a file, you use the file_write() function.

(True/False)
4.8/5
(43)

By default, files are opened in binary mode.

(True/False)
4.9/5
(30)

The end-of-file marker is automatically written:

(Multiple Choice)
4.9/5
(41)

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

(Multiple Choice)
4.8/5
(36)

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

(Multiple Choice)
4.9/5
(26)

This term means non-sequentially accessing information in a file.

(Multiple Choice)
4.9/5
(42)

To set up a file to perform file I/O, you must declare:

(Multiple Choice)
4.9/5
(33)

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

(Multiple Choice)
4.9/5
(35)

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

(True/False)
4.9/5
(41)

To access files from a C++ program, you must use this directive:

(Multiple Choice)
5.0/5
(39)

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

(Multiple Choice)
4.9/5
(27)
Showing 1 - 20 of 38
close modal

Filters

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