Multiple choice

Consider the following C++ code:

textfile.open(sample.dat, ios::in);

Where is the get pointer placed after the execution of the above code?

  1. At the beginning of the file

  2. At the end of the file

  3. In the middle of data file

  4. At the current position of data file

  5. Automatically positioned

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

This is the correct option as whenever a user sends read request to a data file, the get pointer is always positioned at the beginning of the data file sample.dat.