Difference bitwen in c and c++?



Answer:
There are many, being the main the object oriented programming (OOP), but there are others as boolean types, etc.
2 pluses
C was the C++ predecessor. As it's name implies, alot of C remains in C++. Although not actually being more powerful than C, C++ allows the programmer to more easily manage and operate with Objects, using an OOP (Object Oriented Programming) concept.

C++ allows the programmer to create classes, which are somewhat similar to C structures. However, to a class can be assigned methods, functions associated to it, of various prototypes, which can access and operate within the class, somewhat like C functions often operate on a supplied handler pointer.

Although it is possible to implement anything which C++ could implement in C, C++ aids to standarize a way in which objects are created and managed, whereas the C programmer who implements the same system has alot of liberty on how to actually implement the internals, and style among programmers will vary alot on the design choices made.

In C, some will prefer the handler-type, where a main function initializes a handler, and that handler can be supplied to other functions of the library as an object to operate on/through. Others will even want to have that handler link all the related function pointers within it which then must be called using a convention closer to C++.

To finish this discussion, C++ applications are generally slower at runtime, and are much slower to compile than C programs. The low-level infrastructure for C++ binary execution is also larger. For these reasons C is always commonly used even if C++ has alot of popularity, and will probably continue to be used in projects where size and speed are primary concerns, and portable code still required (assembly would be unsuitable then).
c is a structured oriented language
c++ is an object oriented language like java...
The C++ programming language was initially created by Bjarne Stroustrup, as a "better C". C++ was an attempt to extend and (to some extent) change the C programming language to overcome some of the common and big problems with the language. C++ was first standardized in 1998, and as such, is a much younger language than C

you can read about more differences at

http://unthought.net/c++/c_vs_c++.html...
C is easy and object orientation is easy so easy plus easy is too easy!
i dont know about c..
but c++ is really boring....
"C lets you shoot yourself in the foot. C++ lets you reuse the bullet."

Seriously, C was designed as a systems programming language that was high level enough to be portable between machine architectures, but would still allow access to hardware specific features for performance. It lacks a lot of the safegaurds that a language like Pascal has. It is a procedural language. It also has a lot of "features" that make it easy to make nasty mistakes.

As time moved on, and programming matured as an art, the object oriented paradigm took hold. An entire generation of C programmers needed an OO language that made use of their programming experience. C++ was written with this in mind. A legitimate C program is actaully a legitimate C++ program, but the reverse is not true. C++ object oriented extensions were powerful enough to satisfy the expressive needs of a generation of programmers without being so purely OO like Smalltalk.
Thus, C++ amplified the expressive (and destructive) ability of C, but without being so novel that the transitioning programmer's heads would explode.

The answers post by the user, for information only, FunQA.com does not guarantee the right.



More Questions and Answers:
  • Which institute is better for engineering among -i.p.& career institute of tech. ?
  • How can we apply slope in airplanes?
  • I need to compare and contrast tempature, heat and thermal energy, can someone help me?
  • What is scaling? (Pertaining to water systems)?
  • I've 3yrs exp in autocad. I wanna work in cad mechanical drafting frm home via net. Where can I find such job?
  • What are some of the best books to buy when Studying Astronautics & Aeronautics Engineering.?
  • What is the expansion or rd2 bn in p89v51rd2bn?
  • I have problems with computing global, segmental, and frequency weighted segmental SNR. Do you have samples?
  • How should I figure out what motors I need to spin this ball?