C++ Memory Management Quiz - Question 7

Last Updated :
Discuss
Comments

How do you check if memory allocation by 'new' was successful in C++?

Checking if the pointer is null

Using the isAllocated() function

Catching an exception

Both A and C

Share your thoughts in the comments