-
What is the output of this program?
#include
using namespace std;
void function();
int main()
{
try
{
function();
}
catch(double)
{
cout << "caught a double type exception..." << endl;
}
return 0;
}
void function()
{
throw 5;
}
-
- abnormal program termination
- caught a double type
- Compilation Error
- Runtime Error
- None of these
Correct Option: A
As we are throwing integer to double it will raise as abnormal program after termination throw statement.