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 |
What is a v-table?
What are the uses of pointers?
How will you call C functions from C ++ and vice-versa?
0 Answers Agilent, Tavant Technologies, Thomson Reuters, Verifone,
What is the best c++ compiler for windows 10?
What do you mean by function overriding & function overloading in c++?
What type of question are asked in GE code writing test based on c++ data structures and pointers?
Define a program that reads two matrices of size 3x3 with real values from the user then prints their sum, difference and multiplication.
What is the use of class in c++?
Is multimap sorted c++?
Given a simple program designed to take inputs of integers from 1-1000 and to output the factorial value of that number, how would you test this program? You do not have access to the code. Please be as specific as possible.
Brief explaination about #include<iostream.h>, cin and cout
Does improper inheritance have a potential to wreck a project?