问题 单项选择题

在一个C源程序文件中所定义的全局变量,其作用域为

A.所在文件的全部范围

B.所在程序的全部范围

C.所在函数的全部范围

D.由具体定义位置和extern说明来决定范围

答案

参考答案:D

解析: 本题考查的知识点是:全局变量的作用域。全局变量的有效范围是从定义变量的位置开始到本源文件结束。如果需要在其他源文件中使用该全局变量,则可以在其他源文件中使用extern关键字来声明该全局变量,这样该全局变量的作用域就被扩展到以extern声明了该全局变量的位置开始到此源文件结束。故本题的正确答案为D。

阅读理解

阅读理解。

     You are probably familiar with the saying: An apple a day keeps the doctor away. A recent research

carried out by the Chinese University of Hong Kong may change the saying: An apple a day may keep aging

away.

     The research chose fruit flies (果蝇), as they share many genes (基因) with humans. The fruit flies were

either fed normally or had an apple extract (浓缩物) added to their diet.

     It turned out that those fruit flies that were given apple extract lived about 55 days - five days longer than

the flies that were normally fed. The research group also found it easier for the flies to walk, climb and move

about as they aged.

     According to the result, the researchers believed that the antioxidants (抗氧化剂) in the apple extract

helped clean up dangerous chemicals (化学物质) that cause illnesses, as well as aging.

     In another study, researchers examined diets of thousands of women. They discovered that those who

regularly ate apples were 20 percent less likely to suffer heart illnesses and stroke.

     The apples' genetic code (欲望) was discovered recently. It allows scientists to develop nicer and healthier

fruits. Researchers are already using the information to grow a kind of apples full of antioxidants that can keep

eyes and joints healthy and protect humans against heart illnesses and cancer.

     Apples that kill the desire (欲望) to eat could also be produced, with the first "extra-healthy" apples on

supermarket shelves within just four or five years.

     The team that keeps studying apple DNA includes 100 scientists from five countries. Their research also

suggests that around 65 million years ago, when dinosaurs began to die off, the plant, which would finally

become today's apple tree, experienced a great genetic change. The number of many of its genes doubled.

The extra genes allowed the apple to get used to worse conditions and go through a different development

from peaches, strawberries and other related fruits.

1. Why were fruit flies used for the research?

A. Because they have a similar diet to humans.

B. Because they have a history as long as apples.

C. Because they share a lot of genes with humans.

D. Because they feed on nothing but apple extract.

2. What result did the researchers find out?

A. Apples produce chemicals that can change human genes.

B. Apples have antioxidants that kill chemicals that cause aging.

C. Apples are rich in vitamins that are needed in humans' bodies.

D. Apples produce chemicals that make apples taste more delicious.

3. What happened to apples around 65 million years ago according to the research?

A. Their genes stopped their development as the environment got worse.

B. Their genes became twice in number but they finally died off like dinosaurs.

C. They experienced a great genetic change making them used to worse conditions.

D. They went through a similar development to peaches, strawberries and other related fruits.

4. What can we infer (推断) from the passage?

A. Eating apples may bring us more advantages than we might believe before.

B. People who have the habit of eating apples don't need to see a doctor.

C. Apples that kill the desire to eat are already available in supermarkets now.

D. People will eat apples instead of peaches and strawberries from now on.

单项选择题