MCQsIntermediate MCQsFile HandlingFile Handling 1).What is file handling in C++?1) Managing files for reading and writing2) Creating classes3) Handling memory leaks4) None of the above 2).Which header file is required for file handling?1) <fstream>2) <iostream>3) <file.h>4) None of the above 3).Which class is used for reading from files?1) ifstream2) ofstream3) fstream4) None of the above 4).Which class is used for writing to files?1) ofstream2) ifstream3) fstream4) None of the above 5).How do you open a file in append mode?1) ios::app2) ios::in3) ios::out4) None of the above 6).What is the default mode for opening a file?1) ios::in2) ios::out3) ios::binary4) None of the above 7).How do you check if a file was opened successfully?1) Use the is_open() method2) Check the file size3) Read the file header4) None of the above 8).What does the eof() function check?1) End of file2) File size3) File permissions4) None of the above 9).How do you close a file in C++?1) Use the close() method2) Use the end() method3) Use the terminate() method4) None of the above 10).What happens if you try to read from a file that doesn’t exist?1) An error occurs2) A new file is created3) The program crashes4) None of the above