Summer Special Limited Time 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 8w52ceb345

Given:#include #include using namespace std;int main () {try{int * myarray= new int[1000];}catch (bad_alloc&){cout

Given:

#include

#include

using namespace std;

int main () {

try

{

int * myarray= new int[1000];

}

catch (bad_alloc&)

{

cout << "Error allocating memory";

}

catch (exception& e)

{

cout << "Standard exception";

}

catch (...)

{

cout << "Unknown exception";

}

return 0;

}

What will happen if we use the operator “new” and the memory cannot be allocated?

A.

It prints: Error allocating memory

B.

It prints: Standard exception

C.

It prints: Unknown exception

D.

Compilation error

CPA-21-02 PDF/Engine
  • Printable Format
  • Value of Money
  • 100% Pass Assurance
  • Verified Answers
  • Researched by Industry Experts
  • Based on Real Exams Scenarios
  • 100% Real Questions
buy now CPA-21-02 pdf
Get 60% Discount on All Products, Use Coupon: "8w52ceb345"