-
What is the output of this program?
#include <iostream>
using namespace std;
int main ()
{
try
{
throw 15;
}
catch (int e)
{
cout << "Exception occurred..." << e << endl;
}
return 0;
}
-
- 15
- Exception occurred...
- Compilation Error
- Exception occurred...15
- None of these
Correct Option: D
We are handling the exception by throwing that number. So the output is printed with the given number.