1. Which of the following is the state bit that is set when an attempted operati
ID: 3710937 • Letter: 1
Question
1.
Which of the following is the state bit that is set when an attempted operation fails?
2.
When a file is opened, the file stream object's "read position" is
3.
Which of the following is the member function that writes a single character to a file?
4.
Which of the following data types can be used to create files and read information from them into memory?
5.
Which of the following is the data type that can be used to create files, read data from them, and write data to them?
6.
All stream objects have ________ which indicate the position of the stream.
7.
ofstream, ifstream, and fstream are
8.
Data stored ________ disappears once the program stops running or the computer is powered down.
9.
What is TRUE about the following statement?
out.open("values.dat", ios::app);
10.
Closing a file causes any unsaved information still held in the file buffer to be
ios::failbitExplanation / Answer
Hi,
1)Which of the following is the state bit that is set when an attempted operation fails?
failbit
This bit is set whenever operation fail occurs.
2.When a file is opened, the file stream object's "read position" is
at the beginning of the file
3.Which of the following is the member function that writes a single character to a file?
put
4.Which of the following data types can be used to create files and read information from them into memory?
ifstream
// open a file in read mode.
ifstream infile;
infile.open("afile.dat");
5.Which of the following is the data type that can be used to create files, read data from them, and write data to them?
6.All stream objects have ________ which indicate the position of the stream.
error state bits
7.ofstream, ifstream, and fstream are
data types
8.Data stored ________ disappears once the program stops running or the computer is powered down.
in RAM
9.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.
10.Closing a file causes any unsaved information still held in the file buffer to be
saved to the file
data types
8.Data stored ________ disappears once the program stops running or the computer is powered down.
in RAM
9.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.
10.Closing a file causes any unsaved information still held in the file buffer to be
saved to the file
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.