
C++ Chapter 12
Authored by Colleen Chattaway
Computers
10th Grade - University
Used 39+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
38 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Data stored here disappears once the program stops running or the computer is powered down.
on a CD
in RAM
on a backup tape
on the hard disk
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In order, the three-step process of using a file in a C++ program involves:
Insert a disk, open a file, remove the disk
Create the file contents, close the file,
name the file
Open the file, read/write/save data, close
the file
Name the file, open the file, delete the
file
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
This data type can be used to create files and write information to them but cannot be used to read information from them.
ofstream
ifstream
afstream
outstream
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
This data type can be used to create files, read data from them, and write data to them.
ofstream
iftream
fstream
stream
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement opens a file and links it to a file stream object?
open(aFile) = link(anObject);
file.open("c:\\filename.txt");
linkstream ("filename.txt");
link(open(filename.txt"));
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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 exists, it
should be replaced with a new copy of values.dat
If the file exists, it can
be opened but not modified
None of these
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements opens the file info.txt for both input and output?
dataFile.open("info.txt", ios::in &&
ios::out);
dataFile.open("info.txt", ios::in ,
ios::out);
dataFile.open("info.txt", input || output);
dataFile.open("info.txt", ios::in |
ios::out);
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Microsoft
or continue with
%20(1).png)
Apple
Others
Already have an account?