Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   speciality of C (http://www.go4expert.com/forums/speciality-of-c-t5225/)

srinivasa murthy M B 12Jul2007 18:15

speciality of C
What is there in c- programming that is not there in c++....
that is speciality of c...

shabbir 12Jul2007 19:26

Re: 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.

munkyeetr 12Jul2007 20:19

Re: speciality of C
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.

DaWei 12Jul2007 23:24

Re: speciality of C
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.

munkyeetr 13Jul2007 00:03

Re: speciality of C
Thank you for the correction DaWei.

sharma_atul13 16Jul2007 15:18

Re: speciality of C
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???

All times are GMT +5.5. The time now is 22:52.