adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <iostream>
    using namespace std;
    template <class type>
    class Test
    {
        public:
        Test();
        ~Test();
        type Data(type);
    };
    template <class type>
    type Test<type>::Data(type Var0)
    {
        return Var0;
    }
    template <class type>
    Test<type>::Test()
    {
    }
    template <class type>
    Test<type>::~Test()
    {
    }
    int main(void)
    {
        Test<char> Var3;
        cout << Var3.Data('K') << endl;
        return 0;
    }

a.

k

b.

l

c.

error

d.

runtime error

Answer: (a).k

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?