-
What is the output of this program?
#include <iostream>
#include <exception>
using namespace std;
int main()
{
try
{
double* number= new double[200];
cout << "Memory allocated...";
}
catch (exception& excep)
{
cout << "Exception occurred:" << excep.what() << endl;
}
return 0;
}
-
- Memory allocated...
- Compilation Error
- Exception occurred...
- Runtime Error
- None of these
Correct Option: A
The value will be allocated, if there is enough memory in the system.