Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

Difference Between C and C++ language

Difference Between C and C++ language

C and C++

The big difference b/w C and C++ are that C is a procedural language that means it does not support classes, while C++ support both procedural and object-oriented programming like features classes and objects, Inheritance etc. 

 

There are following in detail difference between c and C++ programming language in easy table form.

 

Comparison        

           

C LanguageC++ Language
HistoryIn 1972, C language was designed by Dennis Ritchie at AT&T Bell Labs.In 1979, C++ was designed by Bjarne Stroustrup at AT&T Bell Labs
Subset / SupersetC language is a subset of C++.C++ language is a superset of C. C++ can run most of C code while C cannot run C++ code.
Input / Output source codeFor output printf

For input  scanf

For output cout

For input  cin

Reference VariableC language does not support reference variables.C++ language does supports reference variables.
Namespace featureC language does not support namespace featureC++ language does Support   NAMESPACE which avoids name collisions.
Function StructureC language does not permit functions for defined inside the structures.C++ language, functions can be used inside a structure code.
Data Hiding SupportC language does not support hiding information because data are free entities and can be manipulated by outside code.C++ language does support Data Hiding feature for example Encapsulation feature.
Procedural / Object OrientedC language is procedural programming that code into a collection of variables, data structures, and subroutineC++ language supports both procedural and objects oriented programming code into objects that methods and data using interfaces.

Examples:

     -Objects and Classes
-Polymorphism
-Encapsulation
-Inheritance

Driven Language TypeC language is a function-driven language.C++ language is an object driven language.