问题 单项选择题

有以下程序: void swapl(int c0[],int c1[]) {int t; t=c0[0]; c0[0]=c1[0];c1[0]=t; } void swap2(int *c0,iht *c1) {int t; t=*c0; *c0=*c1; *c1=t; } main() {int a[2]={3,5},b[2]={3,5}; swapl(a,a+1); swap2(&b[0],&b[1]); printf("%d%d%d%d\n",a[0]a[1],b[0],b[1]); } 程序运行后的输出结果是【 】。

A.3 5 5 3

B.5 3 3 5

C.3 5 3 5

D.5 3 5 3

答案

参考答案:D

解析:函数swap1、swap2的作用均为交换两个数。主调函数"swap1(a,a+1)"使得数组a的首地址赋给形参c0[],使得 c0指向a[0]所在的存储单元,a[1]的地址赋给形参c1[],使得c1指向a[1]所在的存储单元,故交换c0[0]与c1[0]后,a[0]与a[1]值也发生了变化;主调函数"swap2(&b[0],&br[1]);"起着同样的作用,使得指针变量c0指向了b0)存储单元,c1指向了b[1]存储单元,并在swap2函数中发生了交换,所以b[0]、b[1]的值也发生变化,故本程序输出的结果是5353。

单项选择题
阅读理解

三:阅读理解(共20小题;每小题2分,满分40分)

阅读下列短文,从每题所给的四个选项(A,B,C和D)中,选出最佳选项。

A

Most dog owners feel that their dogs are their best friends. Almost everyone likes dogs because they try hard to please their owners. One of my favorite stories is about a dog who wanted his owner to please him.

One of my friends has a large German shepherd ( 牧羊狗) named Jack. Every Sunday afternoon, my friend takes Jack for a walk in the park. Jack likes these long walks very much.

One Sunday afternoon, a young man came to visit my friend. He stayed a long time, and he talked and talked. Soon it was time for my friend to take Jack for his walk, but the visitor didn’t leave. Jack became very worried about his walk in the park. He walked around the room several times and then sat down directly in front of the visitor and looked at him. But the visitor paid no attention. He continued talking. Finally, Jack couldn’t stand it any longer. He went out of the room and came back a few minutes later. He sat down again in front of the visitor, but this time he held the man’s hat in his mouth.

  German shepherds aren’t the only intelligent dogs. Another intelligent dog is a Seeing Eye dog. This is a special dog which helps blind people walk along the streets and do many other things. We call these dogs Seeing Eye dogs because they are the “eye” of the blind people and they help them to “see”. Seeing Eye dogs generally go to special schools for several years to learn to help blind people.

56. The writer tells the story about the dog Jack to show that _____________.

A. like many other dogs, it always tried to please its owner master

B. unlike many other dogs, it always wanted its master to please it

C. it was more intelligent than many other dogs

D. it was the most faithful dog of his friend’s

57. Jack came to sit in front of the visitor in order to __________.

A. please him                                          B. be pleased

C. ask him to leave immediately                 D. invite him for a walk

58. The sentence “Finally, Jack couldn’t stand it any longer.” means_________.

A. Jack could no longer put up with the visitor

B. Jack could no longer stand but he might sit down

C. Jack was very tired and wanted a rest

D. Jack was very angry with the visitor

59. Which of the following titles would be the best for the passage?

A. Dogs--- A Great Help to People                 B. Dogs--- Our Faithful Companions

C. An Introduction to Dogs                 D. Famous Dogs in Germany