What is multiple inheritance? Give Example

Answer Posted / hemanth

When class is derived from more than one base class, it is
called as multiple inheritance.
Class a {
int b;

public:
void fun();
}
Class C {
int d;

public:
void fun();
}
Class d :public a, public c {
int x;

void fun1();
}
----------

Here class d inherits class a and c, hence multiple inheritance.

Is This Answer Correct ?    33 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is interface in oop?

666


Can bst contain duplicates?

682


What are two types of polymorphism?

620


What are the 5 oop principles?

611


What is difference between oop and pop?

620






can inline function declare in private part of class?

3666


What is polymorphism in oops?

565


How to hide the base class functionality in Inheritance?

649


How many human genes are polymorphic?

581


what is the sylabus for priliminaries?

1698


IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?

1585


What is polymorphism what is it for and how is it used?

578


Why is object oriented programming so hard?

618


Why do we need polymorphism in c#?

697


How to use CMutex, CSemaphore in VC++ MFC

4339