Question OOP-EXC-0066
HardWhat is the output of this code?
#include <iostream>
#include <stdexcept>
using namespace std;
#include <stdexcept>
int main() {
try {
throw out_of_range("idx");
} catch (const logic_error &e) {
cout << "logic ";
} catch (const out_of_range &e) {
cout << "range ";
}
cout << "done";
}
- A.
range done
- B.
logic range done
- C.
Sign up free to see the answer and a step-by-step explanation.