Question Detail Which among following is correct syntax of closing a file in c++ ? myfile$close();myfile@close();myfile:close();myfile.close(); Answer: Option D Similar Questions : 1. 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 ); Answer: Option A 2. Which stream class is to only write on files ? ofstreamifstreamfstreamiostream Answer: Option A 3. Which stream class is to only read from files ? ofstreamifstreamfstreamiostream Answer: Option B 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 ); Answer: Option C 5. Which among following is correct syntax of closing a file in c++ ? myfile$close();myfile@close();myfile:close();myfile.close(); Answer: Option D Read more from - C++ File Handling Questions Answers