Examveda

What will be the output of the following C++ code?
#include <iostream>
using namespace std;
void Funct();
int main()
{
    try 
    {
        Funct();
    }
    catch(double) 
    {
        cerr << "caught a double type..." << endl;
    }
    return 0;
 }
void Funct()
{
    throw 3;
}

A. caught a double type

B. compile time error

C. abnormal program termination

D. runtime error

Answer: Option C


Join The Discussion

Related Questions on Functions and Procedures in C plus plus