Home >>C++ Tutorial >C Vs CPP

c vs cpp

C vs C++

There are many differences and the race of who is better is never going to end. Hence, here we boiled down the facts of C vs C++ so that you can judge it yourself.

Sr No C C++
1 C language generally follows the procedural style of programming. C++ is different from C as it is multi-paradigm and known to support both procedural and object oriented programming.
2 In terms of security, the data of the user is less safe in C. C++ offers to use modifiers for class members that make it almost inaccessible for the outside users.
3 Top-down approach is followed by C. The bottom-up approach is followed by C++.
4 Function overloading is not supported by C. Function overloading is supported by C.
5 Functions cannot be used in structures in C. Functions can be used in structures in C++.
6 Reference variables are not supported by the C language. Reference variables are supported by the C language.
7 For input/output scanf() and printf() are widely used in the C language. In order to perform input and output operations stream cin and cout are used in C++ language.
8 The operator overloading cannot be performed in the C language. Overloading the operator can be performed in the C++ language.
9 Procedures and modules are the two sections in which the C programs are divided. Functions and classes are the two sections in which C++ programs are divided.
10 The feature of namespace is not provided by the C language. The feature of namespace is provided by the C++ language.
11 Exception handling has is performed using other functions in the C language, however, it is not easy. Exception handling in C++ is provided by using Try and Catch block.

No Sidebar ads