Solved

Given the Following Function Template Template ≪typename T>

Question 27

Multiple Choice

Given the following function template template <typename 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.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents