Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1654
  • Last Modified:

Difference b/w c and c++

What are the main differences b/w c and c++
0
hellhe
Asked:
hellhe
1 Solution
 
minamkhanCommented:
Actually c is a structured language whereas c++ is  hybrid language in which one can write both structured and objectoriented code.
0
 
bcladdCommented:
C++ is object-oriented and C is not.

C++ supports inheritance through the use of related (inherited) classes.
C++ supports polymorphism through the use of virtual funcitons.

C++ supports meta-programming using templates; C and C++ share a preprocessor and many things are possible using macro definitions but templated classes and functions permit more complex, compile-time progrmaming (known as meta programming in the C++ literature).

C++ has exception handling

C++ has the Standard Template Library (STL), a standard library that has a string class as well as dynamically sized container classes that are efficient and easy to use.

C++ is, generally speaking, a super-set of C (I know Plauger would beat me for that generalization).

Hope this helps, -bcl
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now