Multiple choice

Which of the following functions is used to write the contents of the binary file associated with ofstream object?

  1. read()

  2. write()

  3. tellg()

  4. tellp()

  5. seekg()

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

This function is used to write the contents of the binary file associated with ofstream object.