首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
已知主函数中通过如下语句序列实现对函数模板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
27
问题
已知主函数中通过如下语句序列实现对函数模板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://kaotiyun.com/show/LJAp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
实现比较两个字符串大小的函数是_____。
有以下程序:#include<iostream>usingnamespacestd;intmain(){intx;for(inti=1;i<=100;i++)
不能作为函数重载的判断依据的是()。
运算符重载仍然保持其原来的优先级、________和________
如果一个模板声明列出多个参数,则多个参数之间必须使用______隔开,每个参数都必须重复使用关键字______。
有如下类声明:classXA{intx;public:XA(intn){x=n;}};classXB:publicXA{inty;
在C++类中,默认的数据成员的访问权限是【 】。
在双目运算符中需要声明其右操作数时,完成的是【 】重载,而需要声明全部操作数时,完成的是【 】重载。
算法的复杂度主要包括时间复杂度和______复杂度。
算法的时间复杂度是指
随机试题
男性,74岁,吃拌凉菜后腹泻水样便每日3~4次,嗜睡1天,经门诊入院,既往有糖尿病史,体检:BP 22/12kPa(180/92mmHg),血钠145mmol/L,脱水貌,心界左锁骨中线外1.5cm,心音低钝,心率70次/分,血糖38.9mmol/L,血钾
卵泡发育过程中最早出现卵泡腔的卵泡是()
下列关于冠心病的易患因素叙述。不正确的是
北细辛主产于薄荷主产于
关于沐浴的说法正确的是
(2011年卷二第18题)根据合同法及相关规定,下列关于提存哪些是正确的?
Juliewantedtobecomeafriendof__________sharesherinterests.
Thetelephonesystemisnolongeroperative.
Wemetalarge______ofwhalesonourvoyagetoAustralia.
【B1】【B3】
最新回复
(
0
)