1) T/F. Different operating systems have different rules for naming files. 2) T/
ID: 3532471 • Letter: 1
Question
1) T/F. Different operating systems have different rules for naming files.
2) T/F. fstream objects are only capable of performing file output operations.
3) T/F. ofstream objects, buy default, delete the contents of a file if it already exists when opened.
4) T/F. ifstream objects, by default, create a file if it doesn't exist when opened.
5) T/F. Several file access flags may be joined by using the | operator.
6) T/F. A file may be opened in the definition of the file stream object.
7) T/F. If a file is opened in the definition of the file stream object, no mode flags may be specified.
8) T/F. A file stream object's failmember function may be used to determine if the file was successfully opened.
9) T/F. The same output formatting techniques used with coutmay also be used with file stream objects.
10) T/F. The >> operator expects data to be delimited by whitespace characters.
11) T/F. The getline member function can be used to read text that contains whitespaces.
12) T/F. It is not possible to have more than one file open at once in a program.
13) T/F. Binary files contain unformatted data, not necessarily stored as text.
14) T/F. Binary is the default mode in which files are opened.
15) T/F. The tellp member function tells a file stream object which byte to move its write position to.
16) T/F. It is possible to open a file for both input and output.
Explanation / Answer
1) T/F. Different operating systems have different rules for naming files.
2) T/F.fstreamobjects are only capable of performing file output operations.
3) T/F.ofstreamobjects, buy default, delete the contents of a file if it already exists when opened.
4) T/F.ifstreamobjects, by default, create a file if it doesn't exist when opened.
5) T/F. Several file access flags may be joined by using the | operator.
6) T/F. A file may be opened in the definition of the file stream object.
7) T/F. If a file is opened in the definition of the file stream object, no mode flags may be specified.
8) T/F. A file stream object'sfailmember function may be used to determine if the file was successfully opened.
9) T/F. The same output formatting techniques used withcoutmay also be used with file stream objects.
10) T/F. The >> operator expects data to be delimited by whitespace characters.
11) T/F. The getline member function can be used to read text that contains whitespaces.
12) T/F.It is not possible to have more than one file open at once in a program.
13) T/F. Binary files contain unformatted data, not necessarily stored as text.
14) T/F. Binary is the default mode in which files are opened.
15) T/F. Thetellpmember function tells a file stream object which byte to move its write position to.
16) T/F. It is possible to open a file for both input and output.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.