问题 单项选择题

设rear是指向非空带头结点的循环单链表的尾指针,则删除链表第一个结点的操作可表示为()。

A.p=rear;rear=rear→next;free(p);

B.rear=rear→next;free(p);

C.rear=rear→next→next;free(p);

D.p=rear→next→next;rear→next=p→next;free(p);

答案

参考答案:D

解析:

此题是考查链表的操作,在单向循环链表中要删除头节点时,需要的操作为修改尾节点的下一个节点指针变量,指向第二节点,释放被删除节点。

阅读理解

阅读理解。

  In 1638, John Harvard donated some money and about four hundred books

to a new university. This was the beginning of the library at Harvard University.

The gift was so important that the university was named for John Harvard.

  Thomas Bray began the first free lending library in the late 1600s. He set up

more than 30 or these libraries in the American colonies. However, the idea for

this kind of free library ended when Bray died in 1730. In 1731, Benjamin

Franklin and some friends started the first subscription library in the United

States. In a subscription library people pay money to become members, but they

may borrow the books without paying again.

  In the United States, every child had a free education. This idea soon led to

free libraries. One of the first libraries that used tax money to buy books was a

library in Peterborough, New Hampshire. This library was set up in 1833.

1. The main idea of paragraph 2 is _____.

A. Franklin started the first subscription library

B. in a subscription library people pay money to become members

C. Bray and Franklin were important in the history of public libraries

D. Bray died in 1730 and Franklin died in 1833

2. The underlined word "borrow" means _____.

A. read and write with no help from another person

B. use for a short time and then return

C. like very much

D. lend

3. The reading does not say it, but we can guess that _____.

A. there were free schools in the United States before there were free libraries

B. free schools and free libraries in the United States began at about the same

time

C. the library in New Hampshire also had a free school in it

D. there were free libraries in the United States before there were free schools

4. Havard University began _____.

A. in 1731

B. in 1730

C. in 1833

D. in 1638

5. At the library that Franklin started, _____.

A. children could use books for no money at all

B. people paid a little money in the beginning but none after that

C. people paid a lot of money in the beginning but none after that

D. both A and B

选择题