问题 单项选择题

有以下结构体说明和变量的定义,且指针p指向变量a,指针q指向变量b。则不能把结点b连接到结点 a之后的语句是
struct node
char data;
struct node*next;
a,b,*p=&a,*q=&b;

A.next=q;

B.next=&b;

C.p->next=&b;

D.(*p).next=q;

答案

参考答案:B

解析: 本题考查结构体指针变量的赋值方法。要把结点b连接到结点a之后,必须把b的地址给a的next指针,选项A)中,指针变量q保存的就是变量b的地址,选项B)中的p是指针变量,应该是p-> next=&b;在选项D)中,用*运算符取出结构体变量,并且保存的就是b的地址。

阅读理解

One fine afternoon, I was walking along Fifth Street when I remembered that it was necessary to buy a pair of socks. Why I wished to buy only one pair was unimportant. I turned into the first sock shop that caught my eye. A boy clerk, who could not have been more than seventeen years old came forward. “What can I do for you, sir?” he said “I wish to buy a pair of socks.” I replied.

His eyes shone. There was a note of excitement in his voice. “Did you know that you had come into the finest place in the world to buy socks?” I had no idea of that, as my entrance had been accidental. “Come with me,” said the boy, eagerly. I followed him to the back of the shop, and he began to pull down box after box from the shelves, showing their contents (内装物)for my choice.

“Hold on, lad” I said “I am going to buy only one pair!” “I know that,” said he, “but I want you to see how beautiful these are. Aren’t they wonderful!” There was on his face an expression of seriousness and pride and delight as if he were showing me the secrets of his religion(宗教信仰). I became far more interested in him than in the socks. I looked at him in surprise. “My friend, ” said I, “if you can keep this up, if this is not merely from having a new job, if you can keep up this high spirit and excitement day after day, in ten years you will own every sock in the United States.”

小题1:What did the writer want to buy one fine afternoon?

A.A pair of shoes.

B.A pair of socks.

C.Two pairs of socks.

D.A set of books.小题2:Which is true according to the passage?

A.The shop was on the Second Road.

B.The boy was 18 years old.

C.The boy was not in high spirits.

D.The writer entered the shop by chance.小题3:What the writer said in the last paragraph means that ______.

A.if you don’t work hard, you will lose the job

B.you should keep on following your customs

C.if you keep up your great interest in your work, you will succeed in the future

D.if you are too hardworking, you will fail

单项选择题