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