C++ Programming - OOPS Concepts - Discussion

Discussion Forum : OOPS Concepts - General Questions (Q.No. 48)
48.
Which inheritance type is used in the class given below?
class A : public X, public Y
{}
Multilevel inheritance
Multiple inheritance
Hybrid inheritance
Hierarchical Inheritance
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
11 comments Page 1 of 2.

Pardhu said:   1 decade ago
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.
(2)

Guri said:   8 years ago
I think the right answer would be option D.
(1)

Ramu said:   1 decade ago
Multilevel inheritance?

Multiple inheritance?

Kavya said:   1 decade ago
As it is derived from two classes public x, public y this is known as multiple inheritance.

Akshath said:   1 decade ago
Dude its derived from class A so it probably must be Multilevel or Hierarchical Inheritance.

Mona said:   1 decade ago
It is syntax of multiple inheritance.

Karthick said:   1 decade ago
It consist of two base classes members that's why it is multiple inheritance.

Pooja said:   9 years ago
Which inheritance is the combination of other two inheritance?

Pooja said:   9 years ago
Hybrid or Hierarchical?

Please explain me.

Yashraj said:   8 years ago
Java doesn't have multiple inheritance. It has to be implemented with interface and that does not seem like the interface definition and declaration.


Post your comments here:

Your comments will be displayed after verification.