1. In the
code fout.open("scores.dat", ios::out);
a.
ios::out is the stream operation
mode b. fout
is the header file reference
c.
ios::out is the stream variable
name d. fout
is the name of the file.
Answer : a
2. ifstream fin would be used when
a.
creating a file b. reading a file
c.
appending a file d. removing a file
Answer : b
3. eof( ) is the function used for
a. asserting no errors in a file b. appending data to a file
c. counting the amount of data in a file d. checking for end of file
Answer : d
4. How many files can be accessed at a time?.
a.
Zero b. One
c. Two
d. Many
Answer : d
5. Which of the following header files is
required for creating and reading data files?
a. ofstream.h
b. fstream.h c. ifstream.h
d. console.h
Answer : b
No comments:
Post a Comment