答案查看网,轻松搜题/搜资源
登录
×
登录账号
记住密码
立即注册
忘记密码
×
注册
使用微信扫描二维码,获取账号密码后免费查看答案
前往登录
忘记密码
×
忘记密码
使用微信扫描下方二维码,即可找回您的账号密码
前往登录
立即注册
搜题/搜资源
【单选题】【消耗次数:1】
类的构造函数被自动调用执行的情况是在定义该类的()
①
成员函数时
②
数据成员时
③
对象时
④
友元函数时
参考答案:
复制
纠错
相关题目
【单选题】
类的构造方法被自动调用执行的情况是在定义该类的()
①
成员函数时
②
数据成员时
③
对象时
④
友元函数时
查看完整题目与答案
【单选题】
在创建派生类对象时,构造函数的执行顺序是()
①
对象成员构造函数―基类构造函数―派生类本身的构造函数
②
派生类本身的构造函数―基类构造函数―对象成员构造函数
③
基类构造函数―派生类本身的构造函数―对象成员构造函数
④
基类构造函数―对象成员构造函数―派生类本身的构造函数
查看完整题目与答案
【单选题】
类的构造函数在以下什么情况下会被自动调用( )
①
定义成员函数时
②
定义对象时
③
定义数据成员时
④
定义友元函数时
查看完整题目与答案
【单选题】
类的构造函数在以下什么情况下会被自动调用( )
①
定义成员函数时
②
定义对象时
③
定义数据成员时
④
定义友元函数时
查看完整题目与答案
【单选题】
构造函数是在()时被执行的。
①
建立源程序文件
②
创建对象
③
创建类
④
程序编译时
查看完整题目与答案
【单选题】
假定AA为一个类,inta()为该类的一个成员函数,若该成员函数在类定义体外定义,则函数头为()
①
intAA::a()
②
intAA:a()
③
AA::a()
④
AA::inta()
查看完整题目与答案
【单选题】
当一个类的某个函数被说明为virtual时,该函数在该类的所有派生类中()
①
都是虚函数
②
只有被重新说明时才是虚函数
③
只有被重新说明为virtual时才是虚函数
④
都不是虚函数
查看完整题目与答案
【单选题】
一个类的成员函数也可以成为另一个类的友元函数,这时的友元说明()
①
需加上类域的限定
②
不需加上类域的限定
③
类域的限定可加可不加
④
不需要任何限定
查看完整题目与答案
【判断题】
函数定义在函数调用之后时,必须对函数进行声明后方可调用。
①
正确
②
错误
查看完整题目与答案
【单选题】
定义一个void型函数意味着调用该函数时,函数( )。
①
通过return返回一个用户所希望的函数值
②
返回一个系统默认值
③
没有返回值
④
返回一个不确定的值
查看完整题目与答案
随机题目
【单选题】
I can be a teacher. I’m not a very patient person.
①
seldom
②
ever
③
never
④
always
查看完整题目与答案
【单选题】
I remember _______ you the story last night.
①
telling
②
told
③
to tell
④
have told
查看完整题目与答案
【单选题】
Not __________, with youth unemployment so high, some school – leavers with qualifications fail to find jobs.
①
obviously
②
surprisingly
③
particularly
④
normally
查看完整题目与答案
【单选题】
I’ll send you a short message as soon as I _______ in Hong Kong.
①
arrived
②
will arrive
③
am going to arrive
④
arrive
查看完整题目与答案
【单选题】
Good morning, Dr Johnson’s office. Can I help you?
①
Speaking, please
②
I’d like to make an appointment, please
③
Yes, go on
④
No, you can’t
查看完整题目与答案
【单选题】
The population of many Alaskan cities has __________ doubled in the past three years.
①
larger than
②
as great as
③
more than
④
as many as
查看完整题目与答案
【单选题】
The match was cancelled because most of the members __________ a match without a standard court.
①
objected to having
②
objected to have
③
were objected to have
④
were objected to having
查看完整题目与答案
【单选题】
- Shall we sit up here on the grass or down there near the water?
①
I’d rather stay here if you don’t mind
②
Sorry, I don’t like neither
③
Certainly, why not?
④
Yes, we like these two places
查看完整题目与答案
【单选题】
He said he would continue a support us _____ we didn’t break the rules.
①
as well as
②
as soon as
③
as far as
④
as long as
查看完整题目与答案
【单选题】
Can I have a look at your passport?
①
It is here
②
Here is it
③
Here you are
④
No, you can’t
查看完整题目与答案