问题 单项选择题

以下关于C++语言类的说法中正确的是

A.C++语言的默认访问权限是private

B.c++语言中的类定义,用户一定要自己定义一个构造函数用于实例化类

C.c++语言中的成员函数的实现部分一定要写在类定义外

D.C++语言中的类不能够嵌套定义

答案

参考答案:A

解析:[命题目的] 考查c++语言中类定义和它的概念。
[解题要点] c++语言的默认访问权限修饰符是 private。
[错解分析] c++语言中的构造函数是系统默认就有的,用户可以自己定义也可以不定义,故选项B错误;c++语言的类是可以嵌套定义的,故选项D错误; c++语言中成员函数的实现部分也可以写在类定义内,故选项C错误。
[考点链接] 函数不能嵌套定义。

单项选择题

This was one of my experiences (1) . When I was in my 30s, I was working for a large international company which had its head office in London. I was working in the (2) department.

The company had a training centre which was just outside London. Different courses were held there throughout (3) and I (4) go on one training course a year. These usually started (5) a Sunday evening and lasted six days.

Once I was (6) a week’s training course with about forty (7) sales people. I was in the bar on the Friday evening and suddenly a woman who was (8) behind the bar asked mea curious question. "I hope you don’t (9) my asking," she said, "but I’ve been (10) about it all week. Have you got a sister (11) Mary" The woman’s name was June. And she used to do various jobs at the training centre. She worked in the office, she organized all the food and drink for the centre and she worked in the bar at lunchtime and in the evening.

My answer (12) June’s question was "Yes", and June said, "I thought (13) . I met her last September when she was organizing a course here. " At that time, my sister was working for (14) company but in a different part of the country. That was (15) she came to be at the training centre.

(16) surprised me was how June guessed we were brother and sister. Three things made it even more (17) . First, she had met my sister six months before she met me. Second, they have about sixty new people every week at the training centre. So about one thousand five hundred people had (18) the centre in those six months. And (19) , my sister is married, so she doesn’t have the same family name as me.

We’re not (20) , but I guess we must look quite like each other.

14().

A.the same

B.a different

C.another

D.the other

单项选择题