What is the use of "new" operator?



What is the use of "new" operator?..

Answer / Shilpi Tyagi

The 'new' operator in C++ is used for dynamic memory allocation. It dynamically allocates memory at runtime and returns a pointer to the allocated memory. The size of the memory to be allocated can be specified using the type of variable being created.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Write a program to interchange 2 variables without using the third one.

1 Answers  


I need to find a specific string between two strings how do I do it?

1 Answers   Infosys,


In C++ cout is: a) object b) class c) something else

11 Answers   Infosys, Lehman Brothers,


What is a dll entry point?

1 Answers  


What is the use of endl in c++?

1 Answers  


Write a program to find the reverse Fibonacci series starting from N.

1 Answers   Huawei,


What is slicing?

1 Answers  


Does c++ support multilevel and multiple inheritances?

1 Answers  


write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;

1 Answers  


What is implicit conversion/coercion in c++?

2 Answers  


Which sort is best for the set: 1 2 3 5 4 a) Quick Sort b) Bubble Sort c) Merge Sort

1 Answers  


What do you mean by late binding?

1 Answers  


Categories