-
What is the output of this program?
#include <iostream>
#include <exception>
using namespace std;
int main ()
{
try
{
float* myarray= new float[125];
cout << "Memory Allocated";
}
catch (exception& excep)
{
cout << "Standard exception: " << excep.what() << endl;
}
return 0;
}
-
- Memory Allocated
- Compilation Error
- Standard exception:
- Runtime Error
- None of these
Correct Option: A
Variable will be allocated depends on the available space in the memory, If there is no space means, It will throw an exception.