Home / MCQ Bank / Computer
Computer Standard Template Library (Stl) In C Plus Plus Difficulty: Medium

What will be the output of the following C++ code? #include <iostream> #include <exception> 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; }

Select the correct option to test your answer:

More Computer Questions

Which Java class from the Collections Framework implements a thread-safe list? What is the purpose of the reduce method in Ruby enumerators? Which one of the following statements can be used to select the database? Which of te following is a built-in example of functors in C++? What is the main goal of "cohort analysis" in business analytics?