问题 填空题

以下函数inverse的功能是使一个字符串按逆序存放,请填空。
inverse(char str[])
char m;
int i,j;
for(i=0,j=strlen(str);i<strlen(str)/2; 【18】 ,j--)
m=str[i];
str[i]= 【19】 ;
【20】 ;

答案

参考答案:i++或++i str[j-1] str[j-1]=m

解析: 字符中逆序存放的算法是:将字符串中的第i个字符和第strlen(str)-i个字符交换。然后交换字符串中第i+1个字符和第(strlen(str)-i)-1个字符,故循环变量i的值应改变,且步长为1,所以[18]处应填i++;读程序可知,循环中通过中间变量m交换字符串中的第i个字符和第strlen(str)-i个字符,所以题中[19]、[20]处应分别填写str[j-1]、str[j-1]=m。

阅读理解

D

Anyone for rocket salad? The Chinese are now growing huge vegetables from seeds they sent into space.

If you are the type who worries about the air miles travelled by fruits and vegetables, these beauties aren’t for you. It's because they have travelled a little further than most.

The seeds from which they grew were fired into space, where they orbited the earth for two weeks. Once they returned they were grown in hothouses, producing the monster kinds seen here.

China, which is behind these space fruits and vegetables, says they could be the answer to the world's food crisis.

The 21-pound tomatoes, nine-inch chillies, 15-stone pumpkins and large watermelons growing at the Guangdong Academy of Agricultural Sciences’ hothouses can feed many more than their smaller cousins, and may have more nutrients, the scientists say.

Researcher Lo Zhigang said, "Traditional agricultural development has taken us as far as we can go and demand for food from a growing population is endless. Space seeds offer the opportunity to grow fruits and vegetables bigger and faster. "

He admitted he and his colleagues could not explain why time in orbit caused the seeds to change genetic structure. But they guessed exposure to the cosmic(宇宙的)radiation that attacked the spacecraft in orbit, as well as the near zero gravity conditions, microgravity, could play a part.

"We don't think there's any threat to human health because the genes themselves do not change; just their order changes," he said. "With genetically-modified(GM)crops you have seen environmental problems because they have added genes that can damage other organisms. But with space seeds they don't gain genes; they can only lose them. "

He also claimed the Vitamin C content in some space vegetables was nearly three times higher than in common vegetables, while levels of zinc are also increased.

Western scientists are doubtful. NASA researchers who have experimented with seeds in space say there is not enough benefit to show the cost is reasonable.

63. What do the underlined words "these beauties" in Paragraph 2 probably refer to ______?

A. Beautiful views along the air routes.          B. Travelling experiences in space.

C. Seeds fired into space.                     D. Giant vegetables.

64. We can infer from Lo’s words in Paragraph 6 that _______.

A. our conventional agriculture has developed too slowly.

B. we are asking too much from nature

C. space seeds may help meet our demand for food

D. we'll grow crops in space in the future

65. Why the seeds changed their genetic structure _______.

A. remains to be proved

B. is discovered by Lo Zhigang

C. has something to do with the conditions in hothouses

D. is due to the radiation that attacked them directly

66. What can be inferred from the last paragraph?

A. Western scientists’ doubt is unreasonable.

B. Western scientists don’t believe that Chinese scientists have succeeded in the experiment.

C. Western scientists have proved space seeds to be of no benefit.

D. Western scientists think the cost of space seeds outweighs the benefits

单项选择题