Which of the following statements opens a file named info.txt for both input and output?
A) dataFile.open("info.txt", ios::in && ios::out) ;
B) dataFile.open("info.txt", ios::in, ios::out) ;
C) dataFile.open("info.txt", input || output) ;
D) dataFile.open("info.txt", ios::in | ios::out) ;
E) None of these
Correct Answer:
Verified
Q1: An alternative to using the open member
Q2: To write to a file, you use
Q3: Which of the following is the data
Q5: Data stored _ disappears once the program
Q6: When passing a file stream object to
Q7: When you store data in a variable,
Q8: If a file already exists, you can
Q9: The ios::hardfail bit is set when an
Q10: Which of the following statements opens a
Q11: Which of the following is the data
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents