问题 单项选择题

已定义以下函数:
fun (char* p2, char* p1)
{ while ((*p2=*p1) != ’\0’) {p1++;p2++;} }

A.将p1所指字符串复制到p2所指内存空间

B.将p1所指字符串的地址赋给指针p2

C.对p1和p2两个指针所指字符串进行比较

D.检查p1和p2两个指针所指字符串中是否有’\0’

答案

参考答案:A

解析: fun()函数中声明了两个字符串指针作为形参,在其函数体中用了一个 while循环,首先while括号内表达式*p2=*p1是将 p1所指的内容赋值到p2所指的存储空间中,然后在判断是否为’\0’,表达式的值为真时,执行循环体,指针p1和p2分别下移一位,当p1指向字符,’\0’,时,表达式的值为假,循环结束,故此函数的功能是将 p1所指字符串复制到p2所指内存空间中。所以,4个选项中选项A符合题意。

阅读理解

Social customs (习俗) and ways of behaving change all the time. Things that were considered impolite many years ago are now acceptable. Just a few years ago, it was considered to be impolite behavior for a man to smoke on the street. No man who thought of himself as being a gentleman would make a fool of himself by smoking when a lady was in the room.

Customs also differ from country to country. Does a man walk on the left or the right of a woman in your country? Or doesn’t matter? What about table manners (行为)?

The Americans and British people not only speak the same language but also share a large number of social customs. For example, in both America and England, people shake hands when they meet each other for the first time. Also most Englishmen will open a door for a woman or offer their seats to women, and so will most Americans. Promptness (准时) is important both in England and in America. That is, the dinner guest (客人) either arrive close to the time that has been made or calls up to explain his delay (耽误).

The important thing to remember about social customs is not to do anything that might make other people feel uncomfortable —especially if they are your guests. There is an old story about a man who gave a very formal dinner party. When the food was served (服务), one of the guests started to eat his peas with a knife. The other guests were amused or greatly surprised, but the host calmly picked up his knife and began eating in the same way. It would have been bad manners to make his guest feel foolish or uncomfortable.

小题1:The underlined phrase “make a fool of himself” in the first paragraph means        .

A.make himself strong

B.make himself rich

C.make himself comfortable

D.make himself seemed like a fool小题2: If a dinner invitation is for six o’clock, the guest is supposed to arrive at        six.

A.nearly or a minute or two later than

B.a quarter past

C.a quarter to

D.much later than小题3:The last example in the passage shows       .

A.the correct way to use a knife at table

B.that it is good manners not to make your guest feel foolish or uncomfortable

C.that social customs and ways of behaving change too fast

D.that different counties have different customs小题4:The best title of the passage is         .

A.Different Customs

B.Social Customs

C.Customs Are Changing Fast

D.Different Countries, Different Customs

单项选择题