speciality of C

srinivasa murthy M B's Avatar, Join Date: Jul 2007
Newbie Member
What is there in c- programming that is not there in c++....
that is speciality of c...
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
I don't see a similarity between the 2 apart from C++ supports the C language syntax. I guess you have misframed the question.
0
munkyeetr's Avatar, Join Date: May 2007
Go4Expert Member
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.
0
DaWei's Avatar, Join Date: Dec 2006
Team Leader
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.
0
munkyeetr's Avatar, Join Date: May 2007
Go4Expert Member
Thank you for the correction DaWei.
0
sharma_atul13's Avatar, Join Date: Jul 2007
Light Poster
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???