nerdexam
Microsoft

98-372 · Question #176

You create a program that writes a status message to a file every 10 seconds. You need to ensure that all data is written to the file before the file is closed. When should you call the Flush()…

The correct answer is B. Before writing the entry. See the full explanation below for the reasoning.

Question

You create a program that writes a status message to a file every 10 seconds. You need to ensure that all data is written to the file before the file is closed. When should you call the Flush() method?

Options

  • ABefore opening the file
  • BBefore writing the entry
  • CAfter writing the entry
  • DWhen opening the file

How the community answered

(36 responses)
  • A
    11% (4)
  • B
    81% (29)
  • C
    3% (1)
  • D
    6% (2)

Community Discussion

No community discussion yet for this question.

Full 98-372 Practice