🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Exception Handling in C++: all 10 questions

Quiz: Exception Handling in C++ · Question 1 of 10

When a throw statement runs inside a try block, what happens to the remaining statements in that try block?

When a throw statement runs inside a try block, what happens to the remaining statements in that try block?

  1. A.They run, and then the catch block runs
  2. B.They are skipped, and control jumps to a matching catch block
  3. C.They run only if no catch block matches
  4. D.The program always terminates
Answer & explanation

Correct answer: They are skipped, and control jumps to a matching catch block

throw transfers control immediately; the rest of the try block is not executed.

Can you get the rest right without peeking?

Take the timed Quiz: Exception Handling in C++ quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →