MCQs
Total Questions : 5
Answer: Option C. -> destructor
None.
Answer: Option C. -> terminate
If we have an uncaught exception means, compiler will throw the control of program to
terminate function.
Answer: Option B. -> Funct() was called by terminate().
As there is no integer in this program, We are printing Funct() was called by terminate().
Output:
$ g++ uce4.cpp
$ a.out
Funct() was called by terminate().
Answer: Option C. -> both a & b
In this program, We are using set_terminate to abort the program.
Output:
$ g++ uce2.cpp
$ a.out
terminate handler called
Aborted
Answer: Option A. -> Caught an exception
In this program, We are arising the exception by using the method in the class.
Output:
$ g++ uce3.cpp
$ a.out
Caught a exception