Question 1 of 25
Hints left: 3
Q1
Which of the following is the default mode of the opening using the fstream class?
Q2
What is the return type open() method?
Q3
What happens if an exception is thrown but not caught in C++?
Q4
What is the use of ios::trunc mode?
Q5
Which of the following is used to move the file pointer to start of a file?
Q6
Which of the following is used to create an output stream?
Q7
Which of the following is not used to seek file pointer?
Q8
What does the 'std::exception' class represent in C++ exception handling?
Q9
Which of the following statements are correct? 1. It is not possible to combine two or more file opening mode in open() method. 2. It is possible to combine two or more file opening mode in open() method. 3. ios::in and ios::out are input and output file opening mode respectively.
Q10
Which function is used to retrieve the description of the exception in C++?
Q11
Which of the following is the default mode of the opening using the ifstream class?
Q12
Which keyword is used to throw an exception in C++?
Q13
What is the purpose of re-throwing an exception in C++?
Q14
What is the purpose of the 'catch' block in exception handling in C++?
Q15
Which header file is necessary for exception handling in C++?
Q16
Which of the following is used to create a stream that performs both input and output operations?
Q17
Which of the following is not a part of the exception handling mechanism in C++?
Q18
Which of the following is not a standard exception class in C++?
Q19
Which of the following statements is true about the 'finally' block in C++ exception handling?
Q20
Which function is used in C++ to get the current position of file pointer in a file?
Q21
Which of the following is the default mode of the opening using the ofstream class?
Q22
What is exception handling in C++?
Q23
What is the purpose of the 'try' block in exception handling in C++?
Q24
How do you catch all exceptions in C++?
Q25
What is the function of the 'assert' macro in C++?