单项选择题
以下程序中,错误的行为是( )。 (1) # include <iostream.h> (2) class A (3) { (4) public: (5) int n=2; (6) A(int val){ cout < < val < < endl;} (7) ~A( ){ }; (8) }; (9) void main( ) (10) { (11) A a(0); (12) }
A.一元运算符
B.二元运算符
C.选项A)和选项B)都可能
D.重载错误
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
下面程序的结果是( )。#include<iostream.h>class A{ public:A( ) { cout < < construtA < < end1;}virtual ~A( ) { cout < < destructA < < end1;} };class B:public A{ };class C:public A{ };class D:public B,public C{ };void main( ){ Dd;}
A.constructAdestructA
B.constructAconstructAdestructAdestructA
C.constructAconstructAconstructAdestructAdestructAdestructA
D.constructAconstructAconstructAconstructAdestructAdestructAdestructAdestructA
点击查看答案&解析
单项选择题
下列描述中哪个是正确的
A.2310
B.2016
C.1500
D.1658
点击查看答案&解析
相关试题
下面程序的运行结果为【 】。# include...
问题处理方案的正确而完整的描述称为___...
请定义一个函数名为A,返回值为int,没有参...
若要在C盘根目录下作为二进制文件打开文件t...
以下程序中函数 fun 的功能是:构成一个...