Question OOP-EXC-0010
MediumWhat is the output of this code?
#include <iostream>
using namespace std;
int main() {
try {
throw 42;
} catch (int e) {
cout << "Caught: " << e;
}
return 0;
}
- A.
42
- B.
Terminate
- C.
Caught: 42
- D.
Caught
Sign up free to see the answer and a step-by-step explanation.