What is the output of following program?


			  		

Loading

โœช Choose the correct option.

What is the output of following program?

#include
using namespace std;

class Base
{
public:
void show()
{
cout<<" In Base ";
}
};

class Derived: public Base
{
public:
int x;
void show()
{
cout<<"In Derived ";
}
Derived()
{
x = 10;
}
};

int main(void)
{
Base *bp, b;
Derived d;
bp = &d;
bp->show();
cout << bp->x;
return 0;
}

A. Compiler Error in line " cout << bp->x"
B. Compiler Error in line " bp->show()"
C. In Base 10
D. In Derived 10