C++ is a multi-paradigm programming language that supports object-oriented programming (OOP), created by Bjarne Stroustrup in 1983 at Bell Labs, C++ is an extension(superset) of C programming and the programs are written in C language can run in C++ compilers.
C++ is used by many programmers of different types and coming from different fields. C++ is mostly used to write device driver programs, system software, and applications that depend on direct hardware manipulation under real-time constraints. It is also used to teach the basics of object-oriented features because it is simple and is also used in the fields of research. It is used to create general systems software, drivers for various computer devices, software for servers and software for specific applications and also widely used in the creation of video games.
C++ is a highly portable language and is often the language of choice for multi-device, multi-platform app development.
C++ is an object-oriented programming language and includes classes, inheritance, polymorphism, data abstraction and encapsulation.
C++ has a rich function library.
C++ allows exception handling, and function overloading which are not possible in C.
C++ is a powerful, efficient and fast language. It finds a wide range of applications – from GUI applications to 3D graphics for games to real-time mathematical simulations.
|1||C is a structural or procedural programming language.||C++ is an object oriented programming language.|
|2||Functions are the fundamental building blocks.||Objects are the fundamental building blocks.|
|3||In C, the data is not secured.||Data is hidden and can’t be accessed by external functions.|
|4||C follows top down approach.||C++ follows bottom up approach|
|5||C uses scanf() and printf() function for standard input and output.||C++ uses cin>> and cout<< for standard input and output.|
|6||Variables must be defined at the beginning in the function.||Variables can be defined anywhere in the function.|
|7||In C, namespace feature is absent.||In C++, namespace feature is present (we will see later).|
|8||C is a middle level language.||C++ is a high level language.|
|9||Programs are divided into modules and functions.||Programs are divided into classes and functions.|
|10||C doesn’t support exception handling directly. Can be done by using some other functions.||C++ supports exception handling. Done by using try and catch block.|
Features like function overloading and operator overloading is not
|C++ supports function overloading and operator overloading.|
|12||C program file is saved with .C extension.||C++ program file is saved with .CPP extension.|