未知题型
下面是类MyClass的定义,对定义中各种语句描述正确的是( )。
class MyClass { publiC: void MyClass(int a) //①
{ x=a; ) int func(int a,int b) //②
{ x=a; y=b; } int func(int a,int b,int c=0) //③
{ x=a; y=b; z=c; } static void resetValue() //④
{ x=0; } private: int X,y,Z; };
- A.语句①是类MyClass的构造函数定义
B.语句②和语句③实现类成员函数的重载
C.语句④实现对类成员变量x的清零操作
D.语句①、②、③和④都不正确
【参考答案】
D
解析:类的构造函数没有返回类型,所以语句①是错误的;语句②和语句③将会使函数func()的调用产生歧义;成员......
(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)
点击查看答案
相关考题
-
未知题型
随着计算机应用范围的扩大,如何确保计算机的安全性显得日益重要。在常用的对文件进行安全性管理的措施中,(18)的主要任务是不允许未经核准的用户进入系统;(19)是通过系统管理员或文件主对文件属性的设置,来控制用户对文件访问。
A.系统级安全管理
B.用户级安全管理
C.目录级安全管理
D.文件级安全管理 -
未知题型
In the following essay, each blank has four choices. Choose the best answer and write down on the answer sheet.In low - speed network, it is usually adequate to wait for congestion to occur and then react to it by telling the source of packets to slow down. In high - speed networks, this approach often works poorly, because in the(66)between sending the notification and notification arriving at the source, thousands of additional(67)may arrive. In ATM network, a major tool for preventing(68)is(69)control. When a host wants a new virtual(70), it must describe the traffic to be offered and the service expected.
A.interval
B.time
C.slot
D.delay -
未知题型
You are the administrator of a SQL server computer. The server is running SQL Server 6.5 and SQL Server 7.0.You install a named instance of SQL Server 2000, and then run the SQL server upgrade wizard. On the database selection screen, some of the SQL Server 6.5 databases are not listed.You cancel the SQL Server upgrade wizard.You need to ensure that the SQL Server 6.5 databases are listed in the wizard. What should you do?
A.5
B.0.
You
C.5
D.
You
E.
You
F.5
G.Uninstall
H.0,
I.
B.Run
J.
C.Create
K.5
L.
D.Uninstall
M.
