Find the output of following program.


			  		

Loading

Choose the correct option.

Find the output of following program.

#include
using namespace std;

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

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

int main(void)
{
Base *bp = new Derived;
bp->Base::show(); // Note the use of scope resolution here
return 0;
}

A. Runtime Error
B. Compiler Error
C. In Derived
D. In Base

Notifications preferences