download Mastguru Android App

Question Detail

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

  • ios:app
  • ios::out
  • ios::in
  • ios::binary
Similar Questions :

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

  • True
  • False

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. How to find the position at end of fileObject ?

  • fileObject.seekg( 0, ios::end );
  • fileObject.seekg( 0, ios::end );
  • fileObject.seekg( 0, ios::end );
  • fileObject.seekg( 0, ios::end );

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

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