Question Detail Which stream class is used to both read and write on files ? ofstreamifstreamfstreamiostream Answer: Option C Similar Questions : 1. Which stream class is used to both read and write on files ? ofstreamifstreamfstreamiostream Answer: Option C 2. Which among following is used to open a file in binary mode ? ios:appios::outios::inios::binary Answer: Option DExplanation:ios:app -> All output operations are performed at the end of the file, appending the content to the current content of the file. ios::out -> Open for output operations. ios::in -> Open for input operations. 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 ); Answer: Option C 4. Which among following is correct syntax of closing a file in c++ ? myfile$close();myfile@close();myfile:close();myfile.close(); Answer: Option D 5. eof() is used to get easy code reivewend of filedebug reportfile close Answer: Option B Read more from - C++ File Handling Questions Answers