Features of C++ Programming Language
Key Features of C++ Programming
C++ is a general-purpose programming language that is used to develop a wide variety of software applications, including operating systems, embedded systems, high-performance computing applications, and video games.
There are four Features of c++
- Encapsulation
- Data Abstraction
- Polymorphism
- Inheritance
Encapsulation:
⇒Wrapping up Data and functions into a single unit is called Encapsulation.
⇒Encapsulation is a mechanism That binds together code and data into a single unit called class and that keeps both safes from outside interference and misuse
Advantage : Data Security
Data Abstraction:
Data Abstraction Representing essential features and Hiding the background Details is called Data Abstraction.
Advantage: Data Hiding
Access Specifiers
- Public
- Protected
- Private
Public: Public of low-level Security. writing the instruction public section can access by all the parts of the program
Protected: protected is medium-level security. Writing the instruction in the protected section can access by a few parts of the code
Private: Private is very high-Level security. writing the instruction under a private section can access by a particular part of the code
Polymorphism:
An Single entity that can exist in more than one form is called Polymorphism.
There are two types of Polymorphism in c++
- Compile Time Polymorphism
- Run time Polymorphism
1. Compil time Polymorphism again divided into two types
- Function overloading
- Operator overloading
2. Runtime polymorphism
- Virtual function
Inheritance:
Inheritance is a process by which an object inherits the properties of another object belonging to another class.
here new class can be Built from the old one, The Original class is known as the base class and the new class is referred as drived class.
Advantage: Reusability and Extensibility
Further Reading:
For further information and examples, Please visit[ course in production]
Note: If you encounter any issues or specific errors when running this program, please let me know and I'll be happy to help debug them!