首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
如下函数模板: template<class T>Tsquare(T x){return x*x;} 其中T是( )。
如下函数模板: template<class T>Tsquare(T x){return x*x;} 其中T是( )。
admin
2020-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
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
下列程序段的输出结果是【】。#include<iostream.h>voidmain(){inti=10,sum=0;do{sum=+sum+i;
数据库的逻辑模型设计阶段的任务是将______转换成关系模式。
以下程序的输出结果是______。#defineNULL0#include<iostream.h>voidmain(){inta[]={1,2,3,4,5,6,7,8,9,10};int*p=
有如下程序:#include<iostream>usingnamespacestd;classBase{public:virtualvoidfunc1(){cout<<"Base1";}
若要在程序文件中进行标准输入输出操作,则必须在开始的# include命令中使用头文件【 】。
关于new描述错误的是()。
下列运算符中,()运算符在C++中不能重载。
A、 B、 C、 D、 A函数模板定义的一般格式为:Template<typename类型参数>返回类型函数名(模板形参表){函数体}
下面是复数类complex的定义,其中重载的运算符“+”的功能是返回一个新的复数对象,其实部等于两个操作对象实部之和,虚部等于两个操作对象虚部之和;请补充完整。classcomplex{doublereal;
下列的各类函数中,()不是类的成员函数。
随机试题
下列各项税费中,应该记入“营业税金及附加”科目的是()。
强检计量标准是指()。
下列属于引起维生素B1需要量增加或消耗过多的主要原因的是()。
一、注意事项1.申论考试是对考生阅读能力、综合分析能力、提出和解决问题能力以及文字表达能力的测试。2.作答参考时限:阅读资料40分钟,作答110分钟。3.仔细阅读给定资料,按照后面提出的“作答要求"作答。4.请在答题卡上作答,在草稿纸上或其他地方作
图中a-b=()。
《改革热点面对面》是一本上乘的通俗理论读物。首先,它具有很强的现实针对性。纵观全书,篇幅不长,但内涵丰富。老百姓的很多现实疑问,都能在书中找到权威__________;基层干部的一些认识偏差,都可以对照读本__________。填入划横线部分最恰当的一项是
21世纪头12年获得诺贝尔文学奖的东方作家不包括_______。()
Itwasanearlymorninginsummer.Inthestreets,sleepyeyedpeopleweremovingquickly,headingtowardstheirjobs.Thiswas
A—UnitedNationsEnvironmentProgrammeB—WorldHealthOrganizationC—WorldMeteorologicalOrganizationD—World
Ladiesandgentlemen,Goodafternoon.Wehopethatyourvisitherewillbeapleasantone.TodayIwouldliketodrawyoura
最新回复
(
0
)