adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <iostream>
    using namespace std;
    namespace extra
    {
        int i;
    }
    void i()
    {
        using namespace extra;
        int i;
        i = 9;
        cout << i;
    }
    int main()
    {
        enum  letter { i, j};
        class i { letter j; };
        ::i();
        return 0;
    }

a.

9

b.

10

c.

compile time error

d.

none of the mentioned

Answer: (a).9

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?