adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <iostream>
    using namespace std;
    int main()
    {
        try
        {
            throw 1;
        }
        catch (int a)
        {
            cout << "exception number:  " << a << endl;
            return 0;
        }
        cout << "No exception " << endl;
        return 0;
    }

a.

No exception

b.

exception number

c.

exception number: 1

d.

none of the mentioned

Answer: (c).exception number: 1

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?