What is the difference between C and C++ language?
Asked by mr ganeshnnn
-
2 Answers
-
C follows a procedural method of programming (dividing the program into smaller parts known as functions). C+ is an extension of C. It permits object oriented programming (building real life-like objects, defining them and then implementing them in the program). Also, C+ is backwards compatible with C.
-
Following are some of the differences between C and C+. When compared to C+, C is a subset of C+. All valid C programs are valid C+ programs. C is a structural or procedural programming language, while C+ is an object oriented programming language. In C, Functions are the fundamental building blocks, while in C+, Objects are the fundamental building blocks. C doesn't have variable references, while C+ has variable references. C uses malloc and free for memory allocation while C+ uses new and delete for memory allocation. C does not provide direct support for error handling, while C+ supports exception handling that helps in error detec...more
Taking an Exam? Selecting a College?
Get authentic answers from experts, students and alumni that you won't find anywhere else
Sign Up on ShikshaOn Shiksha, get access to
- 64k Colleges
- 968 Exams
- 625k Reviews
- 1500k Answers