填空题
程序的结果为______。
#include"iostream.h"
template<typename T>
T total(T*data)
{
Ts=0;
while(*data)
{
S+=*data++;
}
return S;
}
int main()
{int x[]={2,4,6,8,0,12,14,16,18};
cout<<total(x);
retum 0;
cout<<endl;}
【参考答案】
T
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
在C++语言中每个类都有一个______指针,该指针指向正在调用成员函数的对象。
点击查看答案&解析
填空题
C++语言的基本控制结构为顺序结构、选择结构和______。
点击查看答案&解析
相关试题
语句cout<<’ n’还可表示为_____...
设置虚基类的目的是__[12]__,通过...