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 |
How would you use qsort() function to sort an array of structures?
Is c++ built on c?
if there is binary tree which one is the easiest way to delete all child node?
What is isdigit c++?
Is java as fast as c++?
i want to know how to copy arrary without using any method or function. I have tried the below using System; class e4 { static void Main(string[] args) { int a,b; int[ ] m= new int[5]; int[ ] n= new int[5]; for(a=0;a<=4;a++) { Console.WriteLine("enter any value"); m[a]=Convert.ToInt32(Console.ReadLine()); m[a]=n[a]; } for(b=0;b<=4;b++) { Console.WriteLine(n[b]); } } } but it will give wrong result can anyone solve this problem
What is data structure in c++?
What do you mean by vtable and vptr in c++?
How can we read/write Structures from/to data files?
what is the behaviour of C and C++ compiler for the below statements. int *p; p = malloc(100); Is the behaviour same ? or different ?
Can you use the function fprintf() to display the output on the screen?
How do you establish an is-a relationship?