问题 单项选择题

以下程序有语法错误,有关错误原因的正确说法是( )。
main()
int G=5,k;
void prt_char();

k=prt_char(G);

A.语句void prt_char();有错,它是函数调用语句,不能用void说明

B.变量名不能使用大写字母

C.函数说明和函数调用语句之间有矛盾

D.函数名不能使用下划线

答案

参考答案:C

解析: 在C程序中,若把函数定义放在函数调用之后,应该在函数调用之前对函数进行声明,或称为函数原型说明。函数声明的类型必须与函数返回类型一致,函数声明可以是一条独立的语句,也可以与普通变量一起出现在同一条语句中。本题程序中声明prt_char函数是void类型,与k=prt _ char()的类型矛盾,所以本题的错误在于“函数说明和函数调用语句之间有矛盾”。

阅读理解

When you are about to do something brave, a cheerful wish of “Good luck!” from a friend can be helpful. But if you think you need lots of luck, what else might you do?

In the UK and US there are some strange traditions for bringing yourself a little more good luck. Some are hundreds of years old and some are much newer.

Have you heard the saying “When you wish upon a star”? If you are looking up at the sky on a clear night and you see a sudden flash of light, it is probably a shooting star! Seeing one doesn’t happen very often. The saying goes that if you see one you have been very lucky, and so if you make a wish, it will come true.

Maybe you have heard of the lucky rabbit’s foot. Some people believe that rabbits are lucky animals, so they carry a part of the rabbit, its foot, for good luck. There are all kinds of strange, unclear rules about which of the rabbit’s feet is the luckiest. It is said that this good luck tradition is the oldest one of all. However, as the funny saying goes, “Depend on the rabbit’s foot if you will, but remember it didn’t work for the rabbit!”

People in Britain love trees. If it is autumn and leaves are falling from the trees, some people try to catch the leaves as they fall because they think each leaf they catch will bring them a lucky month in the following year—they will need to catch 12 falling leaves to have a whole of good luck!

小题1:______ is mentioned in the oldest good luck tradition.

A.A rabbit’s foot

B.A falling leaf

C.A cheerful wish from friends

D.A shooting star小题2:From Paragraph 3, we know that ______.

A.shooting stars can often be seen

B.people can see a shooting star on a rainy night

C.your wish may come true if you see a shooting star

D.people believe that it’s unlucky to see a shooting star小题3:British people try to catch 12 falling leaves because ______.

A.the leaves fall in autumn

B.there are so many leaves to catch

C.the leaves can bring them a lucky month

D.they want to have a whole year of good luck小题4:In Paragraph 5, the underlined word “them” refers to(指)______.

A.trees

B.people

C.leaves

D.years小题5:The passage is mainly about ______.

A.how to wish upon a star

B.things that bring good luck

C.British people love leaves

D.which of the rabbit’s feet is the luckiest

单项选择题