Difference Between c and c++

                               C                              C++
1.C is an structured or procedural oriented programming language where the programs are written using several functions.
1.C++ is an object oriented programming language, programs are written using the classes and objects.
2. In C ,No virtual Functions are present.2.  In C++, The concept of virtual Functions are used.
3. In C,  Polymorphism not possible.3. The concept of Polymorphismis used in C++.
"Polymorphismis the most Important Feature of OOPS."
4. C is a low-level language.4. C++ is a middle-level language.
5C uses the top-down approach.5. C++ uses the bottom-up approach.
6. No namespace Feature is present in C Language. 6. Namespace Feature is present in C++ for avoiding Name collision.
7. Multiple Declaration of global variables are allowed.7. Multiple Declaration of global varioables are not allowed.
8. In C, the data is not secured8. In C++, the data is More secured(hidden).

9. Mapping between Data and Function is difficult and complicated.9. Mapping between Data and Function can be used using "Objects"
10. C doesn’t support inline and overloading of functions.10.Inlining and overloading of functions.
11. C requires all the variables to be defined at the starting of a scope.11. C++ allows the declaration of variable anywhere in the scope i.e at time of its First use.
12. No inheritance is possible in C.12. Inheritance is possible in C++
13. C not allows the use of reference variables.13.C++ allows the use of reference variables.
14. It supports built-in and primitive data types.14. It support both built-in and user define data types.
15.  Exception Handling is not present In C.15.  Exception Handling is done with Try and Catch block In C++.

3 comments:

  1. easy to learn,
    thanx..........

    ReplyDelete
  2. helllo…….
    thanx for this information …
    it has a clear differences between the c n c++ ……
    thanks again....

    ReplyDelete
  3. bhargav anna devudu

    ReplyDelete