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...

Difference between multi-level and multiple inheritance?

Answer Posted / muhammad asim

Multiple inheritance::::

Multiple inheritance refers to a feature in which a class can inherit
behaviors and features from more than one superclass. This contrasts
with single inheritance, where a class may inherit from only one
superclass.

Syntax:
Class derived: <access specifier> base_class_name1,
<access specifier> base_class_name2
____________________________________________________________

Multilevel Inheritance:::

When you define more than two levels of inheritance (in the form of a chain of
classes), it would be generally referred to as multi-level inheritance. In the
case of multi-level inheritance, all the members of all super classes would be
automatically available within the sub class.

Syntax:::

Class base_class_name1
{
// List of members
};
Class derived_base_name2 : <access specifier> base_class_name1
{
// List of members
};
Class derived : <access specifier> derived_base_name2
{
// List of members
Class A
Class B
Class C
• Base Class To Both classes B and C but it is
Direct Base Class to B and Indirect Base Class
To Class C.
• Direct Base Class To Class C and Derived
from Class A.
• Derived from Class B, But it also act as
An Indirect Derived Class of A

____________________________________________________________

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is class method?

884


What is throw in c#?

845


What are the 4 pillars of any object oriented programming language?

827


What is the difference between ienumerable and enumerator?

857


What is c# and why it is used for?

897


What is the use of 0 in c#?

937


What is expandoobject in c#?

849


Can we inherit two classes in c#?

899


What does console readline do in c#?

851


What is default access specifier for class in c#?

936


What is ienumerator c#?

816


Explain the difference between event and a delegate in c#?

925


How big is int16?

863


Why var is used in c#?

908


can multiple catch blocks be executed for a single try statement?

929