1.

Which statement is used to catch all types of exceptions?(a) catch()(b) catch(Test t)(c) catch(…)(d) catch(Test)I got this question in an interview.The question is from Exceptions That Are Not Errors topic in chapter Derived Classes, Templates & Exception Handling in C++ of C++

Answer»

The correct CHOICE is (C) catch(…)

Easy explanation - This catch statement will catch all TYPES of EXCEPTIONS that arises in the PROGRAM.



Discussion

No Comment Found

Related InterviewSolutions