0
What is the output of the following C++ program?
#include <iostream>
using namespace std;
class Base { public:
virtual void show() { cout << "B"; }
void hi() { cout << "b"; } };
class Der : public Base { public:
void show() { cout << "D"; }
void hi() { cout << "d"; } };
int main() { Base *p = new Der(); p->show(); p->hi(); }- ABd
- BBb
- CDb
- DDd
Correct answer: C