15 Nov 2019

What is the difference between C and C++?

Difference between C and C++ : Another hot Question that is often asked in interviews or viva for college students. So here are few of them and of course, there may be some more points which have been mentioned below:- 

Difference between C and C++

Sr. No. C C++
1 C is a procedural language C++ is Object Oriented Language.
2 C is older than C++ C++ is also known as C with Classes.
3 In C classes are not allowed It Supports class and other features like inheritance , constructor,destructor …etc.
4 In C we can’t incorporate operator overloading In C++ we can use operator overloading.
5 Few features like function overloading, function overriding are not supported. All these are fully supported in C++.
6 For Dynamic memory allocation generally malloc() is being used However new operator serves the same purpose in C++.
7 No mechanism for handling exceptions Exception Handling is Supported in C++.

 So these were the major difference between C and C++.