What is the output of this code 
#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
template<class G>
G func(G x)
{
 cout<<x;
 return x;
}
 
int func(int x)
{
 cout<<x;
}
 
int main(int argc, char const *argv[])
{
 int x = 2;
 int y = func(x);
 float z = func(2.2);
 return 0;
}

Posted on by