Question Detail

How to get position n bytes forward in fileObject ?

  • fileObject.seekg( ios::cur, n );
  • fileObject.seekg( n, ios:cur );
  • fileObject.seekg( n, ios::cur );
  • fileObject.seekg( ios:cur, n );
Similar Questions :

1. eof() is used to get

  • easy code reivew
  • end of file
  • debug report
  • file close

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

  • ofstream
  • ifstream
  • fstream
  • iostream

3. How to get position n bytes forward in fileObject ?

  • fileObject.seekg( ios::cur, n );
  • fileObject.seekg( n, ios:cur );
  • fileObject.seekg( n, ios::cur );
  • fileObject.seekg( ios:cur, n );

4. Which stream class is used to both read and write on files ?

  • ofstream
  • ifstream
  • fstream
  • iostream

5. 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()
Read more from - C++ File Handling Questions Answers