Advertisements
Advertisements
प्रश्न
What is Inheritance ? Explain any two types of Inheritances with Memory.
उत्तर
The mechanism of deriving a new class from an old one is called as inheritance.The old class is referred as base class and new class is referred as derived class.
There are five types of inheritances in C++:
1. Single inheritance:
A derived class with only one base class is called as single inheritance. It has the form :
2. Multilevel inheritance:
The mechanism of deriving one class
shaalaa.com
C++ Programming
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?