Question
1.
#include
2.
#include
3.
using namespace std;
4.
void myunexpected ()
5.
{
6.
cout
What is the output of this program?
1.
#include
2.
#include
3.
using namespace std;
4.
void myunexpected ()
5.
{
6.
cout
Answer: Option D
Was this answer helpful ?
As we are calling set_unexpected (myunexpected) function, this is printing as unexpected
called and because of operator compliance it is arising an exception.
Output:
$ g++ etea.cpp
$ a.out
unexpected called
caught int
Was this answer helpful ?
Submit Solution