1.

What is the output of this program?
#include <iostream>
#include <exception>
using namespace std;
class NewException: public exception
{
virtual const char* what() const throw()
{
return "New Exception occurred...";
}
} NewExcep;
int main ()
{
try
{
throw NewExcep;
}
catch (exception& e)
{
cout << e.what() << endl;
}
return 0;
}

A. Compilation Error
B. Runtime Error
C. Garbage value
D. New Exception...
E. None of these
Answer» E. None of these


Discussion

No Comment Found

Related MCQs