-->

Difference between C and C++

1 minute read

     Difference between C and C++.

C
C++
C is a proper subset of C++
C++ is a proper superset or C.
C compiler cannot compile the programs written in  C++.
C++ compiler can compile the programs written in C.
C program files have the extension ‘.C’.
C++ program file have the extension ‘.Cpp’.
C is a POP language.
C++ is an OOP language.
C language follows top-down approach.
C++ language follows bottom-up approach.
Variables cannot be declared anywhere in C language.
Variable can be declared anywhere in the C++ language.
It emphasis on procedure.
It emphasis on data.
Large programs are divide into small programs known as functions.
Programs are divided into the objects.
Does not provide the mechanism of data hiding.
Provides the mechanism of data hiding.