?
What will be the output of the following C++ code?
What will be the output of the following C++ code?
#include <iostream>
#include <exception>
using namespace std;
int main ()
{
try
{
double* i= new double[1000];
cout << "Memory allocated";
}
catch (exception& e)
{
cout << "Exception arised: " << e.what() << endl;
}
return 0;
}
#include <iostream>
#include <exception>
using namespace std;
int main ()
{
try
{
double* i= new double[1000];
cout << "Memory allocated";
}
catch (exception& e)
{
cout << "Exception arised: " << e.what() << endl;
}
return 0;
}
Join the Discussion
Login to post a comment or share your explanation.
Login