Professional Documents
Culture Documents
C Vs C++
C Vs C++
C Vs C++
C++
Difference between C and C++
Parameter C C++
The C programming language is a C++ is an object-oriented programming
Programming Style procedural language type. The language language type. The language is object-
is function-driven. driven.
As C is a structured programming
language, the program is divided into As C++ is an object-oriented
Program Division blocks known as functions which can be programming language, the code
viewed as individual components of the consists of Objects and Classes.
program.
File Extension .c is the file extension for the C .cpp is the file extension for C++.
programming language.
Also known as Hands-on language C++ is a more object-oriented
which means C allows the high-level programming language
Ease Of Coding programmer to tell everything. which requires fixed construction
Therefore, one can program it the and principles. However, it is
way we want. It is easy. easier to code.
Contd…
C programming language does not
adhere to the encapsulation C++ is a more secure programming
Data Security
concept and allows easy data language.
manipulation from outside code.
Inline Function C does not support inline function. C++ supports inline functions.
A variable is like a storage location Variables in C++ can be declared
Variable and in C it needs to be defined at anytime.
the beginning itself.
To organize the code for efficiency
Namespace and prevent collisions, namespace C++ as a flexible programming
is required. C does not support language supports namespace.
that.
Contd…