ExamVeda
Login
Home
C plus plus miscellaneous
?

What will be the output of the following C++ code?
#include <iostream>
using namespace std;
template <class type>
class Test
{
    public:
    Test()
    {
    };
    ~Test()
    {  
    };
    type Funct1(type Var1)
    {
        return Var1;
    }
    type Funct2(type Var2)
    {
        return Var2;
    }
};
int main()
{
    Test<int> Var1;
    Test<double> Var2;
    cout << Var1.Funct1(200);
    cout << Var2.Funct2(3.123);
    return 0;
}

Answer & Solution
Correct Answer: Option D
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.