Multiple choice

What is the C++ concept of forming a new class from an existing class or base class called?

  1. Data abstraction

  2. Data encapsulation

  3. Inheritance

  4. Polymorphism

  5. Message passing

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Inheritance is the process of forming a new class from an existing class or base class.The base class is also known as parent class or super class, the new class that is formed is called derived class.Derived class is also known as a child class or sub class. Inheritance helps in reducing the overall code size of the program, which is an important concept in object-oriented programming.