adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <iostream>
    using namespace std;
    template<typename type>
    class TestVirt
    {
        public:
        virtual type TestFunct(type Var1)
        {
            return Var1 * 2;
        }
    };
    int main()
    {
        TestVirt<int> Var1;
        cout << Var1.TestFunct(100) << endl;
        return 0;
    }

a.

100

b.

200

c.

50

d.

none of the mentioned

Answer: (b).200

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?