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 is struct c++?

947


What is the use of endl?

918


How do you establish an is-a relationship?

1074


Is java a c++?

975


How to access a variable of the structure?

1014


What is a c++ vector?

987


Define pure virtual function?

930


Will the following program execute?

990


What is the default width for ouputting a long integer using the insertion operator?

1168


Describe delete operator?

1035


Can I have a reference as a data member of a class? If yes, then how do I initialise it?

1157


Who made c++?

1013


Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement

1092


What does it mean to declare a member variable as static?

1004


What do the keywords volatile and mean mutable?

1004