What is the difference between C and C++?

The difference between C and C++:

•C++ is derived from C Language. It is a Superset of C.
•C++ is an OOPS based means (Predefined class and method for inheriting Class objects
into other classes. ) as in C has not an OOPS features, is a procedural languages.
•Most C Programs can be compiled in C++ compiler.
•C++ expressions are the same as C expressions.
•All C operators are valid in C++.
 
1. C follows the procedural programming paradigm while C++ is a multi-paradigm language(procedural as well as object oriented)
2.This difference is due to specific OOP features like Data Hiding which are not present in C.
3.3. C is a low-level language while C++ is a middle-level language (Relatively, Please see the discussion at the end of the post)
 
C++ was based on C and retains a great deal of the functionality. C++ does not retain complete source-level compatibility with C.
 
Following are the difference between C and C++

- C is procedural language.
- Polymorphism is not possible in C.
- Operator overloading is not possible in C.
- Multiple Declaration of global variables are allowed.

- C++ is non Procedural i.e Object oriented Language.
- The concept of polymorphism is used in C++.
- Operator overloading is one of the greatest feature in C++.
- Multiple Declaration of global varioables are not allowed.
 
Back
Top