问题
单项选择题
以下程序的执行结果是( )。#nclude <iostream.h>template <class T>T max(T x, T y){ retum(x>yx:y);}void main(){ cout<<max(2,5)<<", "<<max(3.5,2.8)<<end1;}
A.5,5.0
B.3.8
C.5,3.5
D.3.5,5
答案
参考答案:C
以下程序的执行结果是( )。#nclude <iostream.h>template <class T>T max(T x, T y){ retum(x>yx:y);}void main(){ cout<<max(2,5)<<", "<<max(3.5,2.8)<<end1;}
A.5,5.0
B.3.8
C.5,3.5
D.3.5,5
参考答案:C