download Mastguru Android App

Question Detail

Which stream class is to only read from files ?

  • ofstream
  • ifstream
  • fstream
  • iostream
Similar Questions :

1. Which stream class is to only read from files ?

  • ofstream
  • ifstream
  • fstream
  • iostream

2. Which is correct syntax ?

  • myfile:open ("example.bin", ios::out);
  • myfile.open ("example.bin", ios::out);
  • myfile::open ("example.bin", ios::out);
  • myfile.open ("example.bin", ios:out);

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

  • ofstream
  • ifstream
  • fstream
  • iostream

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. 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 );
Read more from - C++ File Handling Questions Answers
Post a comment