Which of the following statements opens the file 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) ;
Correct Answer:
Verified
Q2: This member function reads a single character
Q3: Which statement opens a file in such
Q4: This member function can be used to
Q5: To access files from a C++ program,
Q6: In order, the three-step process of using
Q7: This data type can be used to
Q8: The _ marker is the character that
Q9: Data stored here disappears once the program
Q10: What is true about the following statement?
Q11: When used by itself, this access flag
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