Monday, May 24, 2010

What is similarities between c & c++?

C and C++ are programming language.

What is similarities between c %26amp; c++?
Well, the big similarities are as follows:





- syntax, as both have the same syntax


- grammar, although C++ has a slightly extended grammar (all the OOP features introduce a few new operators)


- code structure


- the compilation is about the same (not 100% sure, but it should be given that syntax %26amp; grammar are similar)
Reply:C++ is C but wraped in an OO (Object Orientated) design structure.


C++ contains all the extra syntax and code to be able to write OO programs where as C is totally procedural.





C++ uses classes to define objects.


C does not use objects.





So the similarities are the language itself and not the way language is used to write software.
Reply:C++ is a super set of C.
Reply:1.c is procedure oriented language.(all the problems are sub divided into small problems. first solve the divided problems and finally combine all small problems to get the original solution).





c++ is object oriented language.(here objects are used to acess any variables to solve the problems).





2.In c all program must contain main function.


In c++ all program must contain two classes- main class and sub class.





3.but both c and c++ contain constructors,destructors,constants,varia... etc.,
Reply:c is ok but around 75%


C++ is probably more like b- which is kinda like an 82%





who cares both suck


I get a's
Reply:In the syntax, they exactly the same. But in the the structure, C is not 100% OOD but C++ is

innia

No comments:

Post a Comment