Explain the difference between 'operator new' and the 'new'
operator?
Answer / 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 |
Is sorted c++?
Is string an object in c++?
Name the implicit member functions of a class.
How do you show the declaration of a virtual constructor?
Explain this pointer?
What is a singleton class c++?
How many characters are recognized by ANSI C++?
In inline " expression passed as argument are evalauated once " while in macro "in some cases expression passed as argument are evaluated more than once " --> i am not getting it plz help to make me understand....
0 Answers College School Exams Tests, CS,
What are the various storage classes in C++?
If dog is a friend of boy, is boy a friend of dog?
If you hear the cpu fan is running and the monitor power is still on, but you did not see anything show up in the monitor screen. What would you do to find out what is going wrong?
What are access specifiers in C++?