C++ Basics
C++ Basics
2. Derived Data Types: Derived data types that are derived from the primitive
or built-in datatypes are referred to as Derived Data Types. These can be of
four types namely: Function ,Array ,Pointer ,Reference.
polymorphism.
1.Sub class - Subclass or Derived Class refers to a class that receives properties from
another class.
2.Super class - The term "Base Class" or "Super Class" refers to the class from which
a subclass inherits its properties.
3.Reusability - As a result, when we wish to create a new class, but an existing class
already contains some of the code we need, we can generate our new class from the old
class thanks to inheritance. This allows us to utilize the fields and methods of the pre-
existing class.
Polymorphism
• When one task is performed by different ways i.e. known as polymorphism
• Different situations may cause an operation to behave differently. The type of
data utilized in the operation determines the behavior.
Types of Polymorphism:-
Binding (or wrapping) code and data together into a single unit is known as
encapsulation.