Monday, May 24, 2010

What is the differance between 'c' language and 'c++' language?

it is about the same kind of difference as between chinese and korean...


Both use letters, and are understood by computers. But the syntax, lexic and vocabularies are different.


Helps?





BTW, one being "oops", and the other one not is really bull... Create a struct in "C", shove some pointers to functions into it, and enjoy your very own "object".


Now, create another struct, with the previous one as the first field - and you have just discovered inheritance. Cast a pointer to the second one into a pointer to the first - and that is your polymorphism.





Another myth is that C++ is a "superset of C" or that you can compile a C program with a C++ compiler. This is not true. They look somewhat similar to a human eye, but formally are totally different laguages.


You could, probably, come up with some fairly simple C program, that can be compiled with C++, just like some Spanish words (and even sentenses) are also valid in French, but in general that is not true.


Function pointers are not compatible with void*, or with each other. Integers are not compatible with pointers, and are not assumed by default, you can't skip a type declaration etc, etc.

What is the differance between 'c' language and 'c++' language?
C++ is the superset of C.





Essentially, C++ offers advanced data management through advanced data structures such as classes, prototypes, polymorphism and templates.





In other words, C++ is an abstraction of C, making it easier for programmers to complete applications through clever uses of C++ object -oriented design and coding practices.
Reply:there're many, 4 eg, C is structural programming language...while C++ is Object oriented...





u can check these links 4 more details...


http://www.faqs.org/qa/qa-117.html


http://www.cprogramming.com/tutorial/c-v...
Reply:Well, C++ evolved from C. The major difference between the two is that C++ supports object-oriented design. C++ was initially an extension to C and, as a result, is backwards compatible (meaning you can use C code in C++ programs, but not vice versa).
Reply:the layout of C++ programs looks like C prorams, they starts generally with include statement. most instructions in C are used in C++, But there is a great difference, C++ is an object oriented programing language, that is it has classes which are not used in C. The person who knows C will not necessary be able to understand C++ programs. They have entirely different structure.
Reply:C++ offers more commands.
Reply:C is a procedural language whereas c++ is a object-oriented language.c is the basics to learn c++(though not necessary).Though both are equally powerful c++ offer some more good feature than compare to c.
Reply:the difference is the latter is object oriented ie oop and the former is only procedure oriented ie pop (p standing for program)


the latter is the development of the former
Reply:Essentially, C++ is object-oriented C. This means that C runs faster, but C++ has the power of OOP.





Rawlyn.


No comments:

Post a Comment