_____ are files to which data is written.

CSpro
 (Not rated)
 (Not rated)
Chat

Question 1.1. (TCO 13) _____ are files to which data is written. (Points : 3)

Output files
Input files
Active files
Sequential files















Question 2.2. (TCO 13) When storing and retrieving data, a sequential access file is much like a _____. (Points : 3)

floppy disk
book
hard disk
VCR tape















Question 3.3. (TCO 13) Once you finish using a file, you should _____ it. (Points : 3)

exit
append
close
output















Question 4.4. (TCO 13) The header file that defines the classes for processing and manipulating files is called the _____. (Points : 3)

<iostream>
<fstream>
<pstream>
<mstream>















Question 5.5. (TCO 13) What do the following statements accomplish? 
ofstream theFile;
theFile.open( myFile.txt , ios::out);
 (Points : 3)

Opens myFile in read mode
Opens myFile in append mode
Creates an empty file named myFile
Opens a file in input mode to write to















Question 6.6. (TCO 13) When a file is opened in output mode, the file pointer is positioned _____. (Points : 3)

at the end of the file
at the beginning of the file 
in the middle of the file 
after the file header















Question 7.7. (TCO 13) Which of the following functions should be used to determine if a file was successfully closed? (Points : 3)

is_active
is_open
is_closed
is_ready















Question 8.8. (TCO 13) What is the data hierarchy arranged from largest to smallest? (Points : 3)

File, field, record, byte, bit
File record, field, bit, byte
File, record, field, byte, bit
Record, file, field, bit, byte















Question 9.9. (TCO 13) To use an input file, the program must include _____. (Points : 3)

fstream
instream
outstream
filestream















Question 10.10. (TCO 13) Which of the following is not true about files? (Points : 3)

C++ views each file as a sequential stream of bytes.
Files are opened by creating objects of stream classes.
Member functions of stream objects can be applied to file streams.
istream, ostream, and iostream are derived from ifstream, ofstream, and fstream, respectively.









Question 11.11. (TCO 13) Compare and contrast the mode operators ios::in, ios::app, and ios::out. Provide a C++ code segment that illustrates the use of these mode operators. (Points : 5



    • 11 years ago
    A1 Answer
    NOT RATED

    Purchase the answer to view it

    • cppanswers3_1.docx