What happens when a C++ exception is thrown and no matching catch handler is found anywhere up the call stack?
Correct answer B. std::terminate is called, which by default aborts the program
Explanation
If no handler matches, the runtime calls std::terminate, whose default action is std::abort. Whether the stack is unwound before that is implementation-defined, so destructors may not run. That is why programs often wrap main's body in a try block with catch (const std::exception&) to report the error and clean up gracefully.
Answer checked How we write and check questions
Discussion