Question
Easy

Inheritance allows the following in C++ program:

1
Class Re-usability
2
Creating a hierarchy of classes
3
Extendibility
4
All options are correct
Question Details
Time to Solve: 12
Exam: HTET
Level/Paper: Level 3
Chapter: Object-Oriented Programming (C++)
Topic: Inheritance
Correct Answer
Option D
Explanation

The correct option is (4): Inheritance is a fundamental pillar of Object-Oriented Programming (OOP) in C++ that allows a new class (derived class) to acquire properties and behaviors from an existing class (base class). This mechanism directly enables all the listed options. Class Re-usability is achieved because the derived class automatically incorporates the base class's implemented code, eliminating the need for code duplication. By structuring classes in parent-child relationships, inheritance…Read More