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

Explain the difference between 'operator new' and the 'new'
operator?

Answer Posted / richa

The term "operator new" is used incase when u are
overloading the global "new" operator.We can overload ne
operator just as any other operators i.e +,-,*,=etc.

The term "new operator" is used in case of dynamic
allocation of memory.When a variable is allocated memory
dynamically the new operator is used.
Eg:
int *p=new int;
//here p is pointer to integer.So in order to allocate
memory for it we have used the new operator.

Is This Answer Correct ?    15 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do nonglobal variables default to a) auto b) register c) static

1148


Why do we use pointers in c++?

1028


Is java the same as c++?

985


What is split a string in c++?

1180


What is constructor and destructor in c++?

1110


Can malloc be used in c++?

1073


Show the declaration for a static member variable.

992


What is the difference between a reference and a pointer?

1104


What causes a runtime error c++?

1125


What are all predefined data types in c++?

1121


What is an iterator class in c++?

1133


What is virtual base class uses?

1343


How to declaring variables in c++?

1154


Explain all the C++ concepts using examples.

1199


What is the best c++ book?

1264