Question

Q3: Given the following function template
template < class T >
T maximum( T value1, T value2 )
{
if ( value1 > value2 )
return value1;
else
return value2;
}
what would be returned by the following two function calls?
maximum( 2, 5 );
maximum( 2.3, 5.2 );
a. 5 and a type-mismatch error.
b. 5 and 5.2.
c. 2 and 2.3.
d. Two error messages.

Answer

This answer is hidden. It contains 10 characters.