When is std::bad_alloc exception thrown?
A. When a new operator cannot allocate memory
B. When an alloc function fails
C. When type requested for new operation is considered bad, the exception is thrown
D. When delete operator cannot delete the allocated (corrupted) object
Answer:A
When is std::bad_alloc exception thrown?
A. When a new operator cannot allocate memory B. When an alloc function fails C. When type requested for new operation is considered bad, the exception is thrown D. When delete operator cannot delete the allocated (corrupted) object