Solved

Difference b/w c and c++

Posted on 2003-12-09
2
1,637 Views
Last Modified: 2008-02-26
What are the main differences b/w c and c++
0
Comment
Question by:hellhe
2 Comments
 

Accepted Solution

by:
minamkhan earned 125 total points
ID: 9907738
Actually c is a structured language whereas c++ is  hybrid language in which one can write both structured and objectoriented code.
0
 
LVL 11

Expert Comment

by:bcladd
ID: 9907751
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now