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.

b. 5 and 5.2.

Computer Science & Information Technology

You might also like to view...

In a network, the Processor Manager provides the policies and mechanisms to create, delete, abort, name, rename, find, schedule, block, run, and synchronize processes.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Sarbanes-Oxley (SOX)

A. imposes new corporate disclosure requirements B. imposes new criminal penalties for fraud C. both a. and b. D. none of the above

Computer Science & Information Technology