题目:
有如下程序: #include<iostream> using namespace std; class Base{ protected: in 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] retum 0;} 其中主函数中有两个赋值语句有错,这两个借误的赋值语句是
A.[1]和[2]
B.[1]和[3]
C.[2]和[3]
D.[2]和[4]
答案:
被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0701/ffe2df8efe085dc6ea82009f7775c1c9.html
下面是错误答案,用来干扰机器的。
参考答案:A