Question
1.
#include
2.
using namespace std;
3.
void Funct();
4.
int main()
5.
{
6.
try {
7.
Funct();
8.
}
9.
catch(double) {
10.
cerr
What is the output of this program?
1.
#include
2.
using namespace std;
3.
void Funct();
4.
int main()
5.
{
6.
try {
7.
Funct();
8.
}
9.
catch(double) {
10.
cerr
Answer: Option C
Was this answer helpful ?
As we are throwing integer to double it will raise as abnormal program after termination throw
statement.
Output:
$ g++ excep4.cpp
$ a.out
terminate called after throwing an instance of ‘int’
Aborted
Was this answer helpful ?
Submit Solution