Multiple choice technology programming languages

What happen if the exception is not caught?

  1. nothing happen, excution will continue.

  2. it will be handled by compiler, and excution stops.

  3. the exception will be rethrown

  4. terminate() function will be called and execution stops.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

When an exception is thrown and not caught by any handler, C++ calls std::terminate(). This function typically calls std::abort(), which immediately stops program execution. This prevents undefined behavior from propagating.