有如下程序:
#include<iostream.h>
class Base
protected:int i;
public:int j;
;
class Derived:public Base
int m;
public:int n;
;
int main( )
Derived d;
d.i=0; //[1]
d.j=0; //[2]
d.m=0; //[3]
d.n=0; //[4]
return 0;
其中主函数中有两个赋值语句有错,这两个错误的赋值语句是( )。
题库:计算机等级考试
类型:最佳选择题
时间:2017-07-03 15:45:43
免费下载:《单项选择》Word试卷
有如下程序:
#include<iostream.h>
class Base
protected:int i;
public:int j;
;
class Derived:public Base
int m;
public:int n;
;
int main( )
Derived d;
d.i=0; //[1]
d.j=0; //[2]
d.m=0; //[3]
d.n=0; //[4]
return 0;
其中主函数中有两个赋值语句有错,这两个错误的赋值语句是( )。
A.[1]和[2]
B.[1)和[3]
C.[2]和[3]
D.[2]和[4]
本题关键词:程序,有序镜检,工程施工程序,复苏程序,工作程序,建设程序,程序变更,程序冲突,点火程序,生产程序;