Q. When is std::bad_alloc exception thrown?

  • (A) When delete operator cannot delete the allocated (corrupted) object
  • (B) When type requested for new operation is considered bad, thisexception is thrown
  • (C) When alloc function fails
  • (D) When new operator cannot allocate memory
πŸ’¬ Discuss
βœ… Correct Answer: (A) When delete operator cannot delete the allocated (corrupted) object

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
252
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
94%
Success Rate