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 singleton pattern in c++?
why can't we declare data member of class auto register or extern
What is c++ good for?
What kind of jobs can I get with c++?
Which header file allows file i/o with streams a) fileio.h b) iostream.h c) fstream.h
write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num
How much do c++ programmers make?
Describe delete operator?
If I is an integer variable, which is faster ++i or i++?
How many types of scopes are there in c++?
What are smart pointer? Whats its use?
Is there a new/delete equivalent of realloc?