Discussion
Which of the following are two special functions that are meant for handling exception, that occur during exception handling itself ?
Answer: A
The two special functions that handle exceptions arising during exception handling are terminate() and unexpected(), and both have the return type void. The unexpected() function is called when a function throws an exception that is not in its exception specification, and terminate() is called when no handler is found or when exception handling itself fails.
The options with a non-void version of either function are wrong, since in C++ both are declared as void functions that do not return.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development