download Mastguru Android App

Question Detail

Which stream class is to only read from files ?

  • ofstream
  • ifstream
  • fstream
  • iostream
Similar Questions :

1. Which among following is correct syntax of closing a file in c++ ?

  • myfile$close();
  • myfile@close();
  • myfile:close();
  • myfile.close();

2. 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 );

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

  • ofstream
  • ifstream
  • fstream
  • iostream

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

  • ofstream
  • ifstream
  • fstream
  • iostream

5. Which among following is used to open a file in binary mode ?

  • ios:app
  • ios::out
  • ios::in
  • ios::binary
Read more from - C++ File Handling Questions Answers
Post a comment