New operator - Features, Definition - Memory Management

Q.  Which of the following is not a false statement about new operator?
- Published on 17 Jul 15

a. It can’t be overloaded.
b. It returns garbage value when memory allocation fails.
c. It automatically computes the size of the data object.
d. All of these

ANSWER: It automatically computes the size of the data object.
 

    Discussion

  • Raj   -Posted on 07 Oct 15
    Important properties of new operator in c++.
    • It automatically computes the size of the data object.
    • Locates and reserves storage for the object or objects.
    • Initializes the object(s).
    • Returns a pointer to the object(s) of a pointer type

Post your comment / Share knowledge


Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)