What is multiple inheritance?

Answer Posted / guest

You can derive a class from any number of base
classes. Deriving a class from more than one direct base
class is called multiple inheritance.

In the following example, classes A, B, and C are
direct base classes for the derived class X:

class A { /* ... */ };
class B { /* ... */ };
class C { /* ... */ };
class X : public A, private B,
public C { /* ... */ };
The following inheritance graph describes the
inheritance relationships of the above example. An arrow
points to the direct base class of the class at the tail of
the arrow:



The order of derivation is relevant only to determine the
order of default initialization by constructors and cleanup
by destructors.

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which language is pure oop?

545


what is the drawback of classical methods in oops?

2909


What is abstraction in oop?

625


How do you use inheritance in unity?

583


What is a superclass in oop?

664






write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.

1785


What do you mean by variable?

567


write a program that takes input in digits and display the result in words from 1 to 1000

1981


What is constructor in oop?

578


What does I oop mean?

609


Why interface is used?

547


to find out the minimum of two integer number of two different classes using friend function

1635


Explain the concepts involved in Object Oriented programming.

624


What is encapsulation example?

543


Why is oop better than procedural?

600