如下函数模板: template<class T>Tsquare(T x){return x*x;} 其中T是( )。

admin2020-05-14  16

问题 如下函数模板:
template<class T>Tsquare(T x){return x*x;}
其中T是(    )。

选项 A、函数形参
B、函数实参
C、模板形参
D、模板实参

答案C

解析 本题考查模板函数的基本概念,根据模板函数的定义,T是模板形参,所以答案为C。
转载请注明原文地址:https://kaotiyun.com/show/EM8p777K
0

最新回复(0)