Inside a catch block, what does the statement throw; (with no operand) do?
Correct answer C. It rethrows the exception currently being handled
Explanation
A bare throw; rethrows the current exception object itself, preserving its original dynamic type, so outer handlers can process it further. Writing throw e; instead would throw a copy of e, sliced to e's static type if caught as a base. Using throw; outside any active handler calls std::terminate.
Answer checked How we write and check questions
Discussion