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 happens when you make call 'delete this;'?

1154


Describe the setting up of my member functions to avoid overriding by the derived class?

1194


What is virtual methods?

1179


What is the exit function in c++?

1027


Differences between private, protected and public and give examples.

1121


If dog is a friend of boy, is boy a friend of dog?

1049


Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list

1052


How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?

2368


You want to link a c++ program to c functions. How would you do it?

1039


Can member functions be private?

1051


an integer constant must have atleast one a) character b) digit c) decimal point

1079


Which sort is best for the set: 1 2 3 5 4 a) Quick Sort b) Bubble Sort c) Merge Sort

1100


How a new element can be added or pushed in a stack?

1060


Explain polymorphism?

1123


What is setf in c++?

1153