Multiple Choice
Given the following function template, which of the following are NOT valid calls to larger?
Template <class T>
T largerconst T& left, const T& right)
{
Ifleft > right)
Return left;
Else
Return right;
}
A) int x=3, y=4; cout << largerx,y) ;
B) float x=3, y=4; cout << largerx,y) ;
C) char x='3', y='4'; cout << largerx,y) ;
D) char x[]="3", y[]="4"; cout << largerx,y) ;
Correct Answer:

Verified
Correct Answer:
Verified
Q5: All classes should be converted to templates
Q6: Which would be the correct way to
Q7: When you define a class as a
Q8: If your program defines a class template,
Q9: If you need to pass a class
Q11: Given a class template named listClass, declare
Q12: You may not have overloaded friend operators
Q13: Given the following template function definition, which
Q14: Why can you not use the swap
Q15: Given a class template, how many different