Discussion in 'C' started by srinivasa murthy M B, Jul 12, 2007.
What is there in c- programming that is not there in c++....
that is speciality of c...
I don't see a similarity between the 2 apart from C++ supports the C language syntax. I guess you have misframed the question.
c++ is a superset of c, hence c++ (an increment of c). Now, I believe that any valid c program can be compiled with a c++ compiler, but it doesn't work the other way around. c++ has features that c does not support.
Anyone, please correct me if I am wrong.
C++ is not a strict superset of C. C++ has stricter typing and rules. In C it is perfectly valid to call a function before it has been defined, even if it has not been declared (prototyped). The compiler will assume that it takes an int as an argument, and returns an int. A C++ compiler will reject that. There are a number of other examples. The treatment of structures and the conversion of pointer types, for instance.
Thank you for the correction DaWei.
I think that the speciality of C is that it has inspired to develop C++ as to make a more user friendly language with the help of introducing inheritance and other object oriented concepts.
Plz correct me if I am wrong somewhere???
Separate names with a comma.