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