What will be the output of following code? class Base { public: void display() {cout<<”t base d”; } virtual void show() { cout<<”t base s”; } }; Class Derived: public Base { public: void display() { cout<<”t derived d”; } void show() { cout<<”t derived s”; } }; int main() { Base B; Derived D; Base *bptr;bptr=&B; bptr->display(); bptr->show(); bptr=&D; bptr-> display(); bptr-> show(); return 0; }
Reveal answer
Fill a bubble to check yourself