下列程序的输出结果是( )。 #include using narnespace std; template T fun(T a,T b){return(a

admin2012-12-29  23

问题 下列程序的输出结果是(             )。
    #include
    using narnespace std;
    template
    T fun(T a,T b){return(a<=b)?a:b;}
    int main()
    {
    cout<    return 0;
    }

选项 A、0,3.14
B、3,3.14
C、3,3
D、3.14,3.14

答案B

解析 此函数模板的功能是输出a、b两数中较小的那个数。(3,6)输出3,(3.14F6.28F)输出3.14。
转载请注明原文地址:https://kaotiyun.com/show/95Vp777K
0

随机试题
最新回复(0)