C plus plus is an object-oriented programming language. It is an extension to C programming.
What is C++
C plus plus is a general purpose, case-sensitive, free-form programming language that supports object-oriented, procedural and generic programming.
C++ is a middle-level language, as it encapsulates both high and low level language features.
Object-Oriented Programming (OOPs)
C plus plus supports the object-oriented programming, the five major pillar of object oriented programming used in C++ are:
- Data Hiding
Standard C plus plus programming is divided into three important parts:
- The core library includes the data types, variables and literals, etc.
- The standard library includes the set of functions manipulating strings, files, etc.
- The Standard Template Library (STL) includes the set of methods manipulating a data structure.
Usage of C plus plus
By the help of C++ programming language, we can develop different types of secured and robust applications:
- Window application
- Client-Server application
- Device drivers
- Embedded firmware etc
Limitation of C++
It can’t be used for web designing,this is the only limitation of C++
C vs C plus plus
|1)||C follows the procedural style programming.||C++ is multi-paradigm. It supports both procedural and object oriented.|
|2)||Data is less secured in C.||In C++, you can use modifiers for class members to make it inaccessible for outside users.|
|3)||C follows the top-down approach.||C++ follows the bottom-up approach.|
|4)||C does not support function overloading.||C++ supports function overloading.|
|5)||In C, you can’t use functions in structure.||In C++, you can use functions in structure.|
|6)||C does not support reference variables.||C++ supports reference variables.|
|7)||In C, scanf() and printf() are mainly used for input/output.||C++ mainly uses stream cin and cout to perform input and output operations.|
|8)||Operator overloading is not possible in C.||Operator overloading is possible in C++.|
|9)||C programs are divided into procedures and modules||C++ programs are divided into functions and classes.|
|10)||C does not provide the feature of namespace.||C++ supports the feature of namespace.|
|11)||Exception handling is not easy in C. It has to perform using other functions.||C++ provides exception handling using Try and Catch block.|