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 / kunal kumar

* C does not have any classes or objects. It is
procedure and function driven. There is no concept of access
through objects and structures are the only place where
there is a access through a compacted variable. c++ is
object oriented.


* C structures have a different behaviour compared to
c++ structures. Structures in c do not accept functions as
their parts.


* C input/output is based on library and the processes
are carried out by including functions. C++ i/o is made
through console commands cin and cout.


* C functions do not support overloading. Operator
overloading is a process in which the same function has two
or more different behaviours based on the data input by the
user.


* C does not support new or delete commands. The memory
operations to free or allocate memory in c are carried out
by malloc() and free().


* Undeclared functions in c++ are not allowed. The
function has to have a prototype defined before the main()
before use in c++ although in c the functions can be
declared at the point of use.


* After declaring structures and enumerators in c we
cannot declare the variable for the structure right after
the end of the structure as in c++.


* For an int main() in c++ we may not write a return
statement but the return is mandatory in c if we are using
int main().


* In C++ identifiers are not allowed to contain two or
more consecutive underscores in any position. C identifiers
cannot start with two or more consecutive underscores, but
may contain them in other positions.


* C has a top down approach whereas c++ has a bottom up
approach.


* In c a character constant is automatically elevated to
an integer whereas in c++ this is not the case.


* In c declaring the global variable several times is
allowed but this is not allowed in c++.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the concepts involved in Object Oriented programming.

1147


Give two or more real cenario of virtual function and vertual object

2289


How do you define social class?

1015


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...

2051


What are the components of marker interface?

998


what are the different types of qualifier in java?

2219


What is polymorphism oop?

1011


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

1813


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1866


What is the example of polymorphism?

1025


What is the types of inheritance?

1032


Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box

2552


What is byval and byref? What are differences between them?

2153


What is polymorphism and example?

983


What type of loop is a for loop?

1052