Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the main difference between c and c++?

Answer Posted / sumit gupta , bangalore

In object oriented programming, the programmer can solve
problems by breaking them down into real-life objects (it
presented the programmer with an opportunity to mirror real
life). What is an object? This topic is dealt with
extensively in the chapter on ‘Objects and Classes’ but a
brief introduction is provided here.

Consider the category of cars. All cars have some common
features (for example all cars have four wheels, an engine,
some body colour, seats etc.). Are all cars the same? Of
course not. A Fiat and a Ford aren’t the same but they are
called as cars in general. In this example cars will form a
class and Ford (or Fiat) will be an object.

For those people who know C programming, it would be useful
to know the differences between C and C++. Basically C++
includes everything present in C but the use of some C
features is deprecated in C++.

*C does not have classes and objects (C does not support
OOP)
*Structures in C cannot have functions.
*C does not have namespaces (namespaces are used to
avoid name collisions).
*The I/O functions are entirely different in C and C++
(ex: printf( ), scanf( ) etc. are part of the C language).
*You cannot overload a function in C (i.e. you cannot
have 2 functions with the same name in C).
*Better dynamic memory management operators are
available in C++.
*C does not have reference variables (in C++ reference
variables are used in functions).
*In C constants are defined as macros (in C++ we can
make use of ‘const’ to declare a constant).
*Inline functions are not available in C.

Is This Answer Correct ?    1710 Yes 235 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between procedural programming and oops?

1130


What does oop mean in snapchat?

1233


What exactly is polymorphism?

1127


write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory

3224


Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

4147


What is encapsulation and abstraction? How are they implemented in C++?

1136


What is oops and its features?

1080


What are the three parts of a simple empty class?

2049


What is inheritance in oop?

1033


Can we have inheritance without polymorphism?

1025


What is object and example?

1178


Which method cannot be overridden?

1093


I have One image (means a group photo ) how to split the faces only from the image?............ please send the answer nagadurgaraju@gmail.com thanks in advace...

2112


Is this job good for future? can do this job post grduate student?

2164


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

2151