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
Why it is called runtime polymorphism?
How do you achieve runtime polymorphism?
What is polymorphism programming?
what type of questions
What are the 4 pillars of oop?
What are the 5 oop principles?
Why is destructor used?
Why do we need oop?
Can we create object of interface?
Will I be able to get a picture in D drive to the c++ program? If so, help me out?
What is an interface in oop?
Why polymorphism is used in oops?
What is static in oop?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
What are the three parts of a simple empty class?