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 are the decision making statements in C++? Explain if statement with an example?
What is a memory leak c++?
What is fixed in c++?
Explain function overloading and operator overloading.
You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()
What is the use of volatile keyword in c++? Give an example.
What is a virtual destructor? Explain the use of it?
iam a fresher to Qt(GUI a c++ based framework software). i need to develop the basic applications on designer by drag and dropping mechanism...so pls send me the procedure to design applications?
What is c++ similar to?
Define a nested class. Explain how it can be useful.
Describe linked list using C++ with an example.
How many types of classes are there in c++?