1.

What is the output of this program?
#include <typeinfo>
#include <iostream>
using namespace std;
class N
{
public:
virtual ~N();
};
int main()
{
N* ptr = NULL;
try
{
cout << typeid(*ptr).name() << endl;
}
catch (bad_typeid)
{
cout << "Object is NULL" << endl;
}
}

A. NULL
B. Compilation Error
C. Runtime Error
D. Object is NULL
E. None of these
Answer» E. None of these


Discussion

No Comment Found

Related MCQs