← 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?
- A.They run, and then the catch block runs
- B.They are skipped, and control jumps to a matching catch block
- C.They run only if no catch block matches
- 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 →