Difference between c and c++

The following is the difference between c and c++

1. c language which is a procedure oriented programming language whereas c++ is a mixture of both procedure and object oriented programming language.

2. c does not have virtual function whereas c++ has virtual function.

3. c programs use top-down approach while c++ programs use bottom-up approach.

4. The namespace is not available in c language while namespace is available in c++.

5. c does not have inheritance whereas c++ has inheritance facility.

6. c is a middle level language while c++ is a high level language.

7. Function overloading is not available in c while function overloading is available in c++.

8. c does not have operator overloading whereas operator overloading is available in c++.

9. There is no concept of polymorphism in c, whereas the concept of polymorphism is available in c++.

10. c supports only built-in data type whereas c++ supports both built-in and user defined data type.

11. c was developed by Dennis ritchie in 1969 while c++ was developed by Bjrane stroustrup in 1979.

12. c is what it does not support encapsulation while c++ supports encapsulation.

13. c language does not support reference variable whereas c++ language supports reference variable.

14. scanf () and printf () functions are used for input and output in c. Whereas Cin and Cout functions are used for input and output in c++.

15. Exception handling facility is not available in c whereas it is available in c++.

16. c programs are divided into modules and procedures while c ++ programs are divided into classes and functions.

OurNetHelps is a web-based information portal, we produce unique step by step articles on different subjects. Check out our all articles Here.

Latest Articles