首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
已知主函数中通过如下语句序列实现对函数模板swap的调用: int a[10], b[10]; swap(a, b, 10); 下列对函数模板swap的声明中,会导致上述语句序列发生编译错误的是( )。 A) template<ty
已知主函数中通过如下语句序列实现对函数模板swap的调用: int a[10], b[10]; swap(a, b, 10); 下列对函数模板swap的声明中,会导致上述语句序列发生编译错误的是( )。 A) template<ty
admin
2017-10-17
25
问题
已知主函数中通过如下语句序列实现对函数模板swap的调用:
int a[10], b[10];
swap(a, b, 10);
下列对函数模板swap的声明中,会导致上述语句序列发生编译错误的是( )。
A) template<typename T>
void swap(T a[], T b[], int size);
B) template<typename T>
void swap(int size, T a[], T b[]);
C) template<typename T1, typename T2>
void swap(T1 a[], T2 b[], int size);
D) template<class T1, class T2>
void swap(T1 a[], T2 b[], int size);
选项
A、
B、
C、
D、
答案
B
解析
转载请注明原文地址:https://jikaoti.com/ti/Jnt0FFFM
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
【】是指反映数据元素之间逻辑关系的数据结构。
在程序设计阶段应该采取________和逐步求精的方法,把一个模块的功能逐步分解,细化为一系列具体的步骤,进而用某种程序设计语言写成程序。
派生类的构造函数的成员初始化列表中,不能包含()。
已知类A有公用数据成员a,且有A obj2;A * const ptr=new A;则下列语句正确的是
数据库系统的主要特点为数据集成性、数据的高______和低冗余性、数据独立性和数据统一管理和控制。
有如下语句序列:intk=0;do{k+=5;cout<<’$’;}while(k<19);while(k--0>0)cout<<’*’;执行上面的语句序列输出字符$和*的个数分别是
数据库设计的根本目标是要解决
( )是以一种完全通用的方法来设计函数或类而不必预先说明将被使用的每个对象的类型。
下列选项中,正确的C++标识符是
若有语句int*point,a=4;和point=&a;下面均代表地址的一组选项是
随机试题
关于女子基础体温叙述,错误的说法是()。
按投资主体的不同来划分,普通股票可分为()。
下列不属于按照投资对象进行基金分类的是()。
采用下列何种策略时,股价上升买入股票,股价下降卖出股票?()
下列项目中,属于职工薪酬的有()。
以下属于文件的有_________。
理性是“人类认识真理的能力”,“人类的精神不靠上帝光亮的帮助而能够自然达到一系列真理”。这种观点出现在()。
()是根据财务活动的历史资料,考虑现实的要求和条件,对企业未来的财务活动和财务成果做出科学的预计和测算。
下列叙述中正确的是( )。
—Readthetextabouttheimportanceofqualifications.—Inmostofthelines34-45thereisoneextraword.Oneortwolines,ho
最新回复
(
0
)