Question 53Asked in BEL PE Computer Science, 20 Dec 2025 (5:00 PM)

To write data to the end of a file using WriteFile() without truncating its contents, the file should be opened with which configuration?

  1. ATRUNCATE_EXISTING | GENERIC_WRITE
  2. BOPEN_EXISTING | GENERIC_WRITE, then move pointer to end
  3. COPEN_ALWAYS | GENERIC_READ
  4. DCREATE_ALWAYS | GENERIC_WRITE, then move the pointer to start
Show answerHide answer

Correct answer: (B) OPEN_EXISTING | GENERIC_WRITE, then move pointer to end

From BEL PE Computer Science PYQ, 20 Dec 2025 (5:00 PM)

This is question 53 of BEL PE Computer Science PYQ, 20 Dec 2025 (5:00 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.