问题 填空题

以下程序中,fun函数的功能是求3行4列二维数组每行元素中的最大值,请填空。
void fun(int, int, int(*)[4], int*);
main()
int a[3][4]=12, 41, 36, 28, 19, 33, 15, 27, 3, 27, 19, 1, b[3], i;
fun(3, 4, a, b);
for(1=0; i<3; i++)printf("% 4d", b[i]);
printf("\n");

void fun(int m, int n, int ar[][4], int * bar)
int i, j, x;
for(i=0; i<m; i++)
x=ar[i][0];
for(j=0; j<n; j++)if(x<ar[i][j])x=ar[i][j];
【10】 =x;

答案

参考答案:bar[i]

解析: fun函数中的内层for循环,求出了每一行中的最大值x,内循环结束后就需要把最大值放在存储每行最大值的数组bar[i]中,因此应填bar[i]。

阅读理解

After years of study, I have known there are only two types of people in this world: those who get to the airport early and those who arrive when the plane is about to take off.

If there were any justice(公正)in this world, early-airport people would be rewarded for doing the right thing. And late-airport people would be punished. But early-airport people get ulcers(溃疡), heart attacks and bite their fingernails to the bone. Late-airport people almost don’t realize they are flying.

A guy of that kind once said, “Don’t hurry. If you miss your flight, it’s because God doesn’t want you to go.” This is clearly a guy who is never going to get an ulcer.

Early-airport people suffer another “name”. They are called exactly what they are -wimps(窝囊废). I know. I was an early-airport person for years. “My baggage will get on the plane first,” I told myself. Indeed it would, which made it the last baggage they took off the plane after landing.

Another strange thing: No matter how early I showed up, I was always told that someone had called two or three years ahead of me and asked for the best seat. I thought it was a trick. I thought there was someone in America who called every airline every day and said: “Is that wimp Simon flying somewhere today? If he is , give me his seat.”

After a lifetime arguing with my wife over whether I really have to pack 24 hours in advance and set the alarm clock four hours ahead, I have learned another fact about early-airport people and late –airport people:

They always marry each other.

小题1:We can learn from the passage that     .

A.late-airport persons are often nervous

B.early-airport persons are always at ease during the flight

C.early-airport persons get their baggage first after the landing

D.late-airport persons always take things easy小题2: Paragraph 5 mainly wants to tell us that      .

A.someone always plays tricks on the writer

B.the airlines usually fool passengers

C.early-airport persons always can’t get good seats

D.the service of airlines is very bad小题3:This passage is written in order to     .

A.give readers tips about taking a plane

B.offer suggestions about having a good plane trip

C.express the writer’s anxiety about taking a plane

D.show people’s different attitudes toward catching planes小题4: It could be inferred that the writer’s wife is     .

A.an early-airport woman

B.a late-airport woman

C.a hot-tempered woman

D.a sensitive woman

单项选择题