Q62
What will be the output of the following C++ code? #include #include using namespace std; class myexc: public exception virtual const char* what() const throw() return "My exception"; myex; int main () try throw myex; catch (exception& e) cout << e.what() << endl; return 0;
A.
My
B.
My exception
AnswerC.
No exception
D.
exception
Answer: Option B
Solution
Answer: Option B
No explanation is given for this question Let's Discuss on Board