Difference between C and C++ Difficulty Level : Easy Last Updated : 14 Jun, 2022 Similarities between C and C++ are: Both the languages have a similar syntax.Same notions of stack, heap, file-scope and static variables are present in both the languages.scanf() and printf() functions are used for input/output in C. cin and cout are used for input/output in C++.Differences between C and C++ are: C++ can be said a superset of C. Major added features in C++ are Object-Oriented Programming, Exception Handling and rich C++ Library.C++ supports polymorphism, encapsulation, and inheritance because it is an object oriented programming language.C++ is known as hybrid language because C++ supports both procedural and object oriented programming paradigms.Header file used by C is stdio.h. Header file used by C++ is iostream.h. Reference variables are not supported by C. Reference variables are supported by C++.C provides malloc() and calloc() functions for dynamic memory allocation, and free() for memory de-allocation.C does no support polymorphism, encapsulation, and inheritance which means that C does not support object oriented programming.Below is the table of differences between C and C++: C C++ C was developed by Dennis Ritchie between the year 1969 and 1973 at AT&T Bell Labs.Data is hidden by the Encapsulation to ensure that data structures and operators are used as intended.C++ provides new operator for memory allocation and delete operator for memory de-allocation.C++ is a superset of C. C contains 32 keywords.For the development of code, C supports procedural programming.Data and functions are separated in C because it is a procedural programming language.Built-in data types is supported in C. Built-in & user-defined data types is supported in C++.Function and operator overloading is not supported in C. Function and operator overloading is supported by C++.C++ is an object-driven language Functions in C are not defined inside structures.The compilation of both the languages is similar.