🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: File Handling in C++: all 10 questions

Quiz: File Handling in C++ · Question 6 of 10

Which mode flag makes every write go to the end of the file?

Which mode flag makes every write go to the end of the file?

  1. A.ios::ate
  2. B.ios::trunc
  3. C.ios::in
  4. D.ios::app
Answer & explanation

Correct answer: ios::app

ios::app appends; ios::ate only starts at the end and still lets you move.

Can you get the rest right without peeking?

Take the timed Quiz: File Handling in C++ quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →