What does this template function indicates?
==================
template<class T, class U>
U func(T a, U b)
{
cout<<a<<"\t"<<b;
}
==================
==================
template<class T, class U>
U func(T a, U b)
{
cout<<a<<"\t"<<b;
}
==================
A. A function taking a single generic parameter and returning a generic type which may be different from argument type
B. A function taking a single generic parameter and returning a generic type which must be different from argument type
C. A function taking a single generic parameter and returning a generic type which must have the same type as argument type
D. A function taking a single generic parameter and returning a specific non-void type
Answer: Option A
Join The Discussion