C++ Programming - OOPS Concepts - Discussion

Discussion :: OOPS Concepts - General Questions (Q.No.48)

48. 

Which inheritance type is used in the class given below?
class A : public X, public Y
{}

[A]. Multilevel inheritance
[B]. Multiple inheritance
[C]. Hybrid inheritance
[D]. Hierarchical Inheritance

Answer: Option B

Explanation:

No answer description available for this question.

Ramu said: (Oct 3, 2013)  
Multilevel inheritance?

Multiple inheritance?

Kavya said: (Mar 13, 2014)  
As it is derived from two classes public x, public y this is known as multiple inheritance.

Akshath said: (Jun 13, 2014)  
Dude its derived from class A so it probably must be Multilevel or Hierarchical Inheritance.

Mona said: (Jul 15, 2014)  
It is syntax of multiple inheritance.

Karthick said: (Dec 20, 2014)  
It consist of two base classes members that's why it is multiple inheritance.

Pardhu said: (Mar 6, 2015)  
Forms of Inheritance:

Single Inheritance: It is the inheritance hierarchy wherein one derived class inherits from one base class.

Multiple Inheritance: It is the inheritance hierarchy wherein one derived class inherits from multiple base class (es).

Hierarchical Inheritance: It is the inheritance hierarchy wherein multiple sub classes inherits from one base class.

Multilevel Inheritance: It is the inheritance hierarchy wherein subclass acts as a base class for other classes.

Hybrid Inheritance: The inheritance hierarchy that reflects any legal combination of other four types of inheritance.

As far as visibility is concerned: Here it is.

Visibility Mode: It is the keyword that controls the visibility and availability of inherited base class members in the derived class. It can be either private or protected or public.

Private Inheritance: It is the inheritance facilitated by private visibility mode. In private inheritance, the protected and public members of base class become private members of the derived class.

Public Inheritance: It is the inheritance facilitated by public visibility mode. In public inheritance, the protected members of base class become protected members of the derived class and public members of the base class become public members of derived class. ;.

Protected Inheritance: It is the inheritance facilitated by protected visibility mode. In protected inheritance, the protected and public members of base class become protected members of the derived class.

Pooja said: (Feb 25, 2017)  
Which inheritance is the combination of other two inheritance?

Pooja said: (Feb 25, 2017)  
Hybrid or Hierarchical?

Please explain me.

Yashraj said: (Nov 6, 2017)  
Java doesn't have multiple inheritance. It has to be implemented with interface and that does not seem like the interface definition and declaration.

Guri said: (Dec 31, 2017)  
I think the right answer would be option D.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.