Difference between C/C++ language


There are so many difference between C and C++ language. Here we discuss some difference which are most important to remember:

1. C is a procedural programming language but C++ is procedural and Object Oriented as well.
2. In C we can't create CLASSES but C++ contain the set of CLASSES.
3. In C the input and output function are performed by scanf() and printf() but in C++ these are performed by cin>> and cout<<.
4. C use the TOP-DOWN approach but C++ uses the  BOTTOM-UP approach.
5. In C declaring the global variable several times is allowed but this is not allowed in C++.
6. C does not support function overloading but C++ supports function overloading.

7. In C function can be declared at the point of use but undeclared function in C++ are not allowed.
8. C language is a function-driven language but C++ is object-driven language.
9. In C data is not secured but in C++ data is secured using DATA HIDING feature.
10. C is a low-level language but C++ is a middle level language.
11. In C we cannot use any reference variable but C++ use reference variable.

12. In C if we use int main() then a return statement is compulsory but in C++ we may not write a return statement.


Thanks
Mukesh Rajput
Mukesh Rajput

Mukesh Rajput

I am a Computer Engineer, a small amount of the programming tips as it’s my hobby, I love to travel and meet people so little about travel, a fashion lover and love to eat food, I am investing a good time to keep the body fit so little about fitness also..

Post A Comment:

0 comments: