Sail E0 Webinar
Question


What is the output of this program?


1.
#include
2.
#include
3.
using namespace std;
4.
void myunexpected ()
5.
{
6.
cout
Options:
A .  unexpected handler called
B .  caught bad_exception
C .  caught other exception
D .  both a & b
Answer: Option D

In this program, We are calling set_unexpected and myfunction, So it is printing the output as the given.
Output:
$ g++ etae.cpp
$ a.out
unexpected handler called
caught bad_exception



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers