Describe new operator?



Describe new operator?..

Answer / Deepak Diwakar

The "new" operator is used for dynamic memory allocation in C++. It allocates memory for an object, initializes it with default values if the object has a constructor, and returns a pointer to the allocated memory. The size of the object is determined by its data type.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

what is the use of void main() in C++ language?

1 Answers  


True or false, if you keep incrementing a variable, it will become negative a) True b) False c) It depends

1 Answers  


Show the application of a dynamic array with the help of an example.

1 Answers  


Difference between pass by value and pass by reference?

1 Answers  


Can user-defined object be declared as static data member of another class?

1 Answers  


Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.

1 Answers  


Why is c++ not purely object oriented?

1 Answers  


Is c++ vector dynamic?

1 Answers  


What is a node class?

1 Answers  


What is stack unwinding?

1 Answers  


What is exception handling? Does c++ support exception handling?

1 Answers  


What is the best c++ compiler?

1 Answers  


Categories