1.

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

A. 2
B. 150
C. Compilation Error
D. 300
E. Runtime Error
Answer» E. Runtime Error


Discussion

No Comment Found

Related MCQs