Home »

What is Difference Between C/C++

Question ListCategory: cWhat is Difference Between C/C++
jamessmith05 author asked 9 years ago
1 Answers
milleranthony7 author answered 8 years ago

C does not have a class/object concept.
C++ provides data abstraction, data encapsulation, Inheritance and Polymorphism.

C++ supports all C syntax.

In C passing value to a function is "Call by Value" whereas in C++ its "Call by Reference"

File extension is .c in C while .cpp in C++.(C++ compiler compiles the files with .c extension

but C compiler can not!)

In C structures can not have contain functions declarations. In C++ structures are like

classes, so declaring functions is legal and allowed.

C++ can have inline/virtual functions for the classes.

c++ is C with Classes hence C++ while in c the closest u can get to an User defined data

type is struct and union.

Please login or Register to Submit Answer