问题 单项选择题

有如下程序    #include<iostream.h>    int func(int a,int B)     { return(a+B) ;}    void main( )    { int x=2,y=5,z=8,r;     r=func(func(x,y),z);     cout < < r;    }  该程序的输出的结果是( )。

A.第二行的声明不会为变量my分配内存空间

B.第二行语句创建一个Vector类对象

C.第三行语句创建一个Vector类对象

D.第三行语句为一个Vector类对象分配内存空间

答案

参考答案:B

解析:此题考查switch语句的用法,switch的判断的条件必须是一个int 型值,也可以是byte,short和char型的值,case中需要注意的是一个case后面一般要接一 个break语句才能结束判断,否则将继续执行其他case而不进行任何判断,如果没有任何 值符合CaSe列出的判断,则执行default的语句,default是可选的,可以没有,如果没有 default而又没有任何值匹配case中列出的值,则switch不执行任何语句。

阅读理解

阅读理解。

     When you are ill, you must be unhappy because your body becomes hot, and there are pains all over. You don't

want to work; you stay in bed, feeling terrible.

    What makes you ill? It is germs(细菌). Germs are everywhere. They are very small and you can't find them with

your eyes, but you can see them with a microscope. They are very small and there could be hundreds of them on or

in a very small thing.

    Germs are always found in dirty water. When you look at dirty water under the microscope, you will see them in

it. So your parents will not let you drink dirty water.

    Germs are found not only in water. They are also found in air and dust(灰尘). If you cut your finger, and if some

of the dust goes into the finger, it will become big and red, and you will have much pain in it. Sometimes germs will

go into your body and you will have pain everywhere.

1.The writer thinks that you will ________ when you are ill.

A.feel hot                  

B.not want to work

C.not feel happy            

D.A, 3 and C

2.You can see germs ________.

A.when you are ill

B.only when you use a microscope

C.when you cut your finger

D.everywhere around you

3.A microscope is used for ________.

A.making very big things look much smaller

B.making very small things look much bigger

C.helping you see things clearly

D.killing germs

4.Your parents don't let you drink dirty water because ________.

A.water will make you ill

B.there are many germs in it

C.you can see germs in it

D.it will make your finger become big and red

5.The writer talks about ________.

A.how to keep dirty water clean

B.how to take care of your fingers

C.how to find germs

D.what makes you ill

不定项选择