Vidyalelo
C++ Programming · Q260

C++ miscellaneous

Programming · C++ Programming · question 260

Q260

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 "exception arised"; myex; int main () try throw myex; catch (exception& e) cout << e.what() << endl; return 0;

A.
exception arised
Answer
B.
error
C.
exception
D.
runtime error

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board