Question
What is the output of this program?
1.
#include
2.
using namespace std;
3.
template
4.
class TestVirt
5.
{
6.
public:
7.
virtual type TestFunct(type Var1)
8.
{
9.
return Var1 * 2;
10.
}
11.
};
12.
int main()
13.
{
14.
TestVirt Var1;
15.
cout
Answer: Option B
Was this answer helpful ?
In this program, We are using class to pass the value and then we are manipulating it.
Output:
$ g++ ftemp3.cpp
$ a.out
200
Was this answer helpful ?
Submit Solution