Multiple choice

What would be the output of the following C++ code?

textfile.seekp(5, ios::beg);

  1. Moves the put pointer by 5 bytes from the beginning of a data file

  2. Moves the get pointer by 5 bytes from the beginning of a data file

  3. Displays the contents of a data file

  4. Modifies data of a data file

  5. Deletes the contents of a data file

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

This is the correct option as seekg() function is used to move the get pointer from the beginning of a data file.