Q439
What will be the output of the following C++ code? #include #include using namespace std; class myexception: 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.
Exception
B.
Error
C.
My exception
AnswerD.
Runtime error
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board