Sail E0 Webinar
Question


What is the output of this program?


1.
#include
2.
using namespace std;
3.
class Base
4.
{
5.
public:
6.
Base(){}
7.
~Base(){}
8.
protected:
9.
private:
10.
};
11.
class Derived:public Base
12.
{
13.
public:
14.
Derived(){}
15.
Derived(){}
16.
private:
17.
protected:
18.
};
19.
int main()
20.
{
21.
cout
Options:
A .  The program executed
B .  Error
C .  Runtime error
D .  None of the mentioned
Answer: Option B

We are not allowed to overload the constructors, So it is arising an exception.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers