Vidyalelo
C++ Programming · Q326

C++ miscellaneous

Programming · C++ Programming · question 326

Q326

What will be the output of the following C++ code? #include using namespace std; template class TestVirt public: virtual type TestFunct(type Var1) return Var1 * 2; ; int main() TestVirt Var1; cout << Var1.TestFunct(100) << endl; return 0;

A.
100
B.
200
Answer
C.
50
D.
150

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board