Tuesday, May 13, 2008

What is Difference Between C/C++

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

No comments: