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 are the 3 levels of programming languages?

1056


What is const pointer and const reference?

1173


What is oops in c++?

1071


Explain binary search.

996


How are Structure passing and returning implemented by the compiler?

1156


Using a smart pointer can we iterate through a container?

1092


Comment on c++ standard exceptions?

1078


What is microsoft c++ redistributable?

1106


What is command line arguments in C++? What are its uses? Where we have to use this?

1281


Why main function is special in c++?

1139


If all is successful, what should main return a) 0 b) 1 c) void

1018


What is encapsulation in c++?

1305


Explain polymorphism?

1084


Differentiate between an array and a list?

1185


What is virtual base class?

1088