Friday, 11 November 2011

Difference Between C and C++


Everybody in the IT world knows about C and C++. Both are Computer LanguagesC and C++. C++ was born after C language, C++ is a super set ofC. Both languages have lots of differences between them. But, I am listing out the 10 Main Difference Between C and C++ languages



Difference Between C and C++

C Language

  1. C Language is not an object oriented language.
  2. C is a procedural programming language.
  3. supports only Structures.
  4. does not have reference variable, only supports pointers.
  5. uses Scanf and Printf for input and output functions.
  6. functions can’t be included in structures.
  7. regarded as a low-level language.
  8. doesn’t support inline functions, instead can be used via #define directive.
  9. uses the top-down approach.
  10. C is function driven.

C++ Language

  1. C Language is a object oriented language (includes 4 OOPs concepts).
  2. C++ is not a procedural programming language.
  3. supports Classes and Objects.
  4. supports both reference and pointer variables.
  5. uses cin>> and cout<< for input and output functions.
  6. functions can be included in structures.
  7. regarded as mix of low-level and high-level language.
  8. supports inline functions.
  9. uses the bottom-up approach.
  10. C++ is Object driven.
admit there can be ‘n’ number of differences, But I have mentioned only the important 

No comments: