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 are benefits of oop?

859


How do you use inheritance in unity?

791


What is the example of polymorphism?

736


What do you mean by Encapsulation?

799


What are two types of polymorphism?

799


how to get the oracle certification? send me the answer

1890


What is an example of genetic polymorphism?

857


What is inheritance and how many types of inheritance?

803


What is data binding in oops?

815


just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.

6696


Why do we use polymorphism?

752


Which is better struts or spring?

798


Why oops is important?

774


Can enum be null?

756


What is difference between data abstraction and encapsulation?

824