Coforge interview question

How to implement inheritance in c++?

Interview Answer

Anonymous

6 Mar 2021

ClassA{ public: void func(){ cout<<"Inherited" } Class B: public A{ }; int main(){ B b; b.func(); }