问题 单项选择题

设有以下定义: union data { int d1; float d2; } demo; 则下面叙述中错误的是( )。

A.变量demo与成员d2所占的内存字节数相同

B.变量demo中各成员的地址相同

C.变量demo和各成员的地址相同

D.若给demd1赋99后,demd2中的值是99.0

答案

参考答案:D

解析: 本题中float所占内存字节数为4,而int类型在VC 6.0中占4字节,所以demo就与成员d2所占字节数是相同的,选项A的说法正确。联合体的所有成员的首地址都是相同的,和联合体变量的地址一致。故选项B和C都是正确的。由于int类型数据和float类型数据在内存中的存放格式是不一样的,所以给d1赋99后,d2中不会得到99.0这个值。故选项D不正确,答案应该选择D。

阅读理解

阅读理解。

    The Guidance Department (教导处) at Berryville High School has a staff (员工) of eleven teachers.

Most of their work is done with the students. But the staff sees a lot of parents, too.

    "parents meetings make clear monthly diagram (图表)," says Mildred Foreman, head of the Guidance.

"This diagram stays much the same from year to year. The busy months are October, March and May."

     September, the beginning of a new school year, starts rather slowly. Few parents come in. Most of

them want to talk about the schedules (日程安排). October brings many problems caused by some

students. Some parents are called in. Others come by themselves. Things quiet down in November.

December is a quiet month. "It's the holiday," Ms Foreman says. "people want to come in, I know, but

they decide to wait until after New Year's Day."

     Report cards go home just before Christmas holidays. Bad marks (分数) bring parents in as school

opens again. This happens again in March, another report card month. May is always the year's busiest

month. That's when parents begin to think that their children may be asked to stay in the same grade again.

They come in to see if anything can be done before things are decided in June.

1.The teachers in the Guidance Department usually ______. [ ]

A.do most of their work for the students

B.answer all the questions from parents

C.help other teachers get along with students and parents

D.only bring report cards to students and parents

2.In December parents usually ______. [ ]

A.stay at home with their children for their holidays

B.wait for the teachers to bring report cards to their children

C.wouldn't like to visit the teachers in the Guidance Department

D.let teachers have a good rest during their holidays

3.In March, each of the teachers working in the Guidance Department has to meet about ______ parents. [ ]

A.55

B.35

C.15

D.5

4.Why do some parents come to school in March? Because ______. [ ]

A.they want to see their children's teachers after Christmas holidays

B.they are called by the teachers of the Guidance Department

C.bad marks have them do it

D.it's the beginning of a new school year

默写题