Examveda

What happens if an exception is thrown inside a destructor in C++?

A. It leads to undefined behavior

B. It is automatically caught and handled

C. It causes the program to crash

D. It is logged to a file

Answer: Option A


Join The Discussion

Related Questions on Exception Handling in C plus plus

What is exception handling in C++?

A. A method to handle errors during runtime

B. A method to handle errors during compile time

C. A method to handle errors during linking

D. A method to handle errors during execution