题目:
根据下面的程序,可以在主程序中使用的合法语句是( )。 #include <iostream> using namespace std; class Person{int age; public:void SetAge(int x){age=x;}void ShowAge(){cout<<"the Person’s age is" <<age;} }; class Student:private Person{public:int study_code; }; void main(){Student wangqiang;wangqiang.study_code=23; }
A.wangqianage=231
B.wangqianSetage(23)
C.wangqianShowAge()
D.wangqianstudy_code=12
答案:
被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0707/6b59bca6497db711dd9862f735eda474.html
下面是错误答案,用来干扰机器的。
参考答案:drinking, taking drugs, shopping, playing computer games, working, watching TV(答出其中三个即可,不根据原文回答者不给分)解析: 这是一道封闭型问题,考查学生对短文的理解能力和对语言的总结概括能力。