Question Detail

How to get position to the nth byte of fileObject ?

  • fileObject.seekg( 'filename',n );
  • fileObject.seekg( n, 'filename' );
  • fileObject.seekg( n );
  • fileObject.seekg( n, ios::app );
Similar Questions :

1. offset counted from the current position using ?

  • ios::curr
  • ios::cr
  • ios::cur
  • ios::current

2. Calling the stream's member function sync() causes an immediate synchronization.

  • True
  • False

3. Which is among following is used to Open a file for output and move the read/write control to the end of the file ?

  • ios::ate
  • ios::at
  • ios::ann
  • ios::end

4. Which functions allow to change the location of the get and put positions ?

  • sg() and sp()
  • sekg() and sekp()
  • gog() and gop()
  • seekg() and seekp()

5. Which stream class is to only write on files ?

  • ofstream
  • ifstream
  • fstream
  • iostream
Read more from - C++ File Handling Questions Answers