The statements inside the body of “if” only execute if the given condition returns true. If the condition returns false then the statements inside “if” are skipped.
The switch case statement is used when we have multiple options and we need to perform a different task for each option.
A loop is used for executing a block of statements repeatedly until a given condition returns false.
The loop is used for executing a block of statements repeatedly until a given condition returns false.
The capability of a class to derive properties and characteristics from another class is called Inheritance. Inheritance is one of the most important feature of Object Oriented Programming. Sub Class: The class that inherits properties from another class is called Sub class or Derived Class. Super Class:The class whose properties are inherited by sub class is called Base Class or Super class
- Single inheritance :- In single inheritance, a class is allowed to inherit from only one class. i.e. one sub class is inherited by one base class only.
- Multiple inheritance :-Multiple Inheritance is a feature of C++ where a class can inherit from more than one classes. i.e one sub class is inherited from more than one base classes.
- Multilevel inheritance :- In this type of inheritance, a derived class is created from another derived class.
Function overloading is a feature in C++ where two or more functions can have the same name but different parameters. Function overloading can be considered as an example of polymorphism feature in C++.