what is the difference in C and C++programming language
Answers
Language-C is a procedural language , C++ is a object oriented language
C is a procedural programming language and does not support classes and objects
while C++ is a combination of both procedural and object oriented programming language
1)-The major difference between C and C++ is that C is a procedural programming language and does not support classes and objects, while C++ is a combination of both procedural and object oriented programming language.
_______________________________________________
2)C was developed by Dennis Ritchie between 1969 and 1973 at AT&T Bell Labs.
C++ was developed by Bjarne Stroustrup in 1979 with C++'s predecessor "C with Classes".
_______________________________________________
3) C does not support object oriented programming; therefore it has no support for polymorphism, encapsulation, and inheritance.
Being an object oriented programming language C++ supports polymorphism, encapsulation, and inheritance.
_______________________________________________
4)-C, being a procedural programming, it is a function driven language.
While, C++, being an object oriented programming, it is an object driven language.
_______________________________________________
5)-C does not support function and operator overloading.
C++ supports both function and operator overloading.
_______________________________________________
6) -C uses functions for input/output. For example scanf and printf. C provides malloc() and calloc() functions for dynamic memory allocation, and free() for memory de-allocation.
C++ uses objects for input output. For example cin and cout. C++ provides new operator for memory allocation and delete operator for memory de-allocation.
_______________________________________________
7)-C does not provide direct support for error handling (also called exception handling)
C++ provides support for exception handling.
************************************************END************************************
Hope you have enjoyed reading differences between C and C++. This comparison of C and C++ explains feature-wise difference between both programming languages. Please do comment if you like the theory. Thanks for reading!
PLEASE VOTE!