Question OOP-EXC-0018
HardWhat is the output of this code?
#include <iostream>
#include <stdexcept>
using namespace std;
int main() {
try {
cout << "1 ";
throw runtime_error("x");
cout << "2 ";
} catch (const exception&) {
}
cout << "3";
return 0;
}
- A.
1 2 3
- B.
1
- C.
Sign up free to see the answer and a step-by-step explanation.