1.

What is the output of this program?
#include <iostream>
using namespace std;
class classA
{
public:
virtual ~classA(){}
protected:
char p;
public:
char getChar();
};
class classB : public classA
{
public:
void printChar();
};
void classB::printChar()
{
cout << "False" << endl;
}
int main()
{
classB ch;
ch.printChar();
return 1;
}

A. True
B. False
C. Runtime Error
D. Compilation Error
E. None of these
Answer» C. Runtime Error


Discussion

No Comment Found

Related MCQs