
Long questions with answers for this topic
Inheritance is creating a derived class from a base class to reuse members.
A base class is the existing class from which another class is derived.
A derived class is a new class that inherits properties/behaviour from a base class.
Single inheritance (one base → one derived).
Constructor order is Base → Derived.
To avoid duplicate copies of a common base class in the diamond inheritance case.
Inheritance creates a derived class from a base class to reuse code. Advantages (any three):
Thus it is a core OOP feature for large programs.
Sign in to access the all questions and answers
It's free and takes just 5 seconds