Exam 13: Advanced File and Io Operations
Exam 1: Introduction to Computers and Programming40 Questions
Exam 2: Introduction to C Plus Plus40 Questions
Exam 3: Expressions and Interactivity40 Questions
Exam 4: Making Decisions40 Questions
Exam 5: Looping40 Questions
Exam 6: Functions40 Questions
Exam 7: Introduction to Classes and Objects40 Questions
Exam 8: Arrays40 Questions
Exam 9: Searching, Sorting, Algorithm Analysis40 Questions
Exam 10: Pointers62 Questions
Exam 11: More About Classes and Object-Oriented Programming70 Questions
Exam 12: More on C-Strings and the String Class40 Questions
Exam 13: Advanced File and Io Operations40 Questions
Exam 14: Recursion20 Questions
Exam 15: Polymorphism and Virtual Functions22 Questions
Exam 16: Exceptions, Templates, and the Standard Template Library Stl40 Questions
Exam 17: Linked Lists38 Questions
Exam 18: Stacks and Queues36 Questions
Exam 19: Binary Trees38 Questions
Select questions type
When a file is opened for reading, the file stream object's "read position" is
Free
(Multiple Choice)
4.8/5
(33)
Correct Answer:
B
The operating system records the information that tracks the end of the file
Free
(Multiple Choice)
4.8/5
(28)
Correct Answer:
C
When used by itself, ________ causes a file's contents to be deleted if the file already exists.
Free
(Multiple Choice)
4.9/5
(44)
Correct Answer:
C
The stream member function fail() can be used to determine whether the last operation performed on a stream was successful.
(True/False)
4.8/5
(41)
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
(30)
Opening a file with the flags ios::in | ios::out will preserve the contents of the file if the file already exists.
(True/False)
4.9/5
(35)
The ________ member function reports when the end of a file has been found.
(Multiple Choice)
4.8/5
(37)
Outside of a C++ program, a file is identified by its ________. Inside a C++ program, a file is accessed through a ________.
(Multiple Choice)
4.9/5
(40)
A file must be ________ before data can be written to or read from it.
(Multiple Choice)
4.7/5
(32)
string objects cannot be stored to a binary file without further processing because they contain pointers.
(True/False)
4.8/5
(36)
Which statement opens a file in such a way that information will only be written to its end?
(Multiple Choice)
4.8/5
(36)
The state bit, ________, can be tested to see if the end of an input stream has been encountered.
(Multiple Choice)
4.9/5
(37)
All stream objects have ________ that indicate the condition of the stream.
(Multiple Choice)
4.7/5
(35)
The member function ________ writes a single character to a file.
(Multiple Choice)
4.8/5
(36)
The state bit ________ is set when an attempted operation has failed.
(Multiple Choice)
4.8/5
(28)
Showing 1 - 20 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)