C++ is an extension of C language.
This means that you can not only use the new features introduced with C++ but can also use the power and efficiency of C language.
This means that you can not only use the new features introduced with C++ but can also use the power and efficiency of C language.
- The main difference between C and C++ is that C++ is object oriented while C is function or procedure oriented.
- Object oriented programming paradigm is focused on writing programs that are more readable and maintainable. It also helps the reuse of code by packaging a group of similar objects or using the concept of component programming model. It helps thinking in a logical way by using the concept of real world concepts of objects, inheritance and polymorphism.
- C++ allows the programmer to create classes, which are somewhat similar to C structures.
- C++ applications are generally slower at runtime, and are much slower to compile than C programs. \
- The in put /out put in the c ( use printf , for the out and scanf for the input ) where as in C++ we hace cout << and cin >>.
- In c we use #include<stidio.h> , but in the c++ we use #include <iostream.h>
- C has predefined data types and the user can not create its own data types(excluding using structure) wherea in C++ a user can creates its own data type using classes.
- C++ uses polymorphism whereas C can't.
- C++ uses Constructor and Destructor wheras there isn't anything like that in C.
- C++ uses inheritance in a better fashion than C.