Which C++ file mode is used to append data at the end of a file?
Options
-
A.
ios::in
-
B.
ios::app
-
C.
ios::trunc
-
D.
More than one of the above
-
E.
None of the above
Correct Answer (Detailed Explanation is Below)
B.
ios::app
Detailed Explanation
Correct Answer: Option B — ios::appExplanation: ios::app positions each output operation at the end of the file. It is useful when adding new content without overwriting existing content.