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 |
Which operator cannot overload?
Explain the differences between list x; & list x();.
Write about c++ storage classes?
Is recursion allowed in inline functions?
Out of fgets() and gets() which function is safe to use and why?
What is data hiding c++?
What is the last index number in an array of 100 characters a) 100 b) 99 c) 101
Why is c++ so fast?
What would happen on forgetting [], while deallocating an array through new?
What is the use of seekg in c++?
What is the meaning of c++?
What is the use of register keyword with the variables?