Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What is difference between abstraction and encapsulation?

1134


Who invented oop?

1193


Why is polymorphism used?

1088


What is the advantage of oop over procedural language?

1130


Will I be able to get a picture in D drive to the c++ program? If so, help me out?

2253


Why it is called runtime polymorphism?

1201


Is data hiding and abstraction same?

1105


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1974


what is the sylabus for priliminaries?

2225


What is abstraction in oop with example?

1191


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?

2255


What is meant by multiple inheritance?

1336


What is the difference between a mixin and inheritance?

1038


What do you mean by variable?

1095


What is encapsulation and abstraction? How are they implemented in C++?

1188