Sunday, July 20, 2014

When is std::bad_alloc exception thrown?

A. When new operator cannot allocate memory
B. When alloc function fails
C. When type requested for new operation is considered bad, thisexception is thrown
D. When delete operator cannot delete teh allocated (corrupted) object

Answer: A

No comments: