问题 单项选择题

有以下程序 int f(int a) { return a%2; } main() { int s[8]={1,3;5,2,4,6},i,d=0;for(i=0;f(s[i]);i++)d+=s[i];printf("%d\n",d) ; } 程序运行后的输出结果是

A.9

B.11

C.19

D.21

答案

参考答案:A

解析:函数f()的作用是形参a为偶数的时候返回0,主函数中首先定义了一个长度为8的一维数组,然后给它赋初值使得s[0]=1、s[1]=3、s[2]=5、s[3]=2、 s[4]=4、s[5]=6。其他没有赋值的数组元素将自动赋值为0。for循环中,当s[i]不为偶数的时,将s[i]相加,即当i=3时,s[i]=2为偶数,退出循环,此时d的值为d=s[0]+ s[1]+s[2]=1+3+5=9,因此最后输出的d的值为9。

阅读理解

To save yourself from embarrassment (尴尬), it’s good to read a few books or research online about the culture and customs of the country you plan to visit.

Clothing: Wearing shorts in public is generally not acceptable in most parts of the world, including some European countries.

Greetings: Handshake is a usually accepted form of greeting, although in some countries, like Japan, a traditional bow(鞠躬) is preferred. Be careful how you talk with someone; don’t use first names unless you are invited to do something.

Language/Gestures: learn some polite expressions (hello-goodbye-thank you) and relax. English is pretty common worldwide, especially in tourist areas and you can always use body language to get your message across. However, some Americans gestures have different meanings in other countries. For example, in Bulgaria, shaking your head usually means  “yes”; shaking it “vertically” means “ no”.

Food/Drink: you may find yourself looking down at a local delicious snake soup in china, sheep’s eyes in Saudi Arabia… and wonder what to do; especially you are guests in someone’s home. Be brave, take small bites, and pretend it tastes like something you like. Remember that some Buddhists don’t eat beef, and Muslims don’t eat pork. If you are eating with Muslims, never touch food with left hand (the left hand is for bathroom use).

Conversations: if you know the history and culture of the country, you will be confident. The French are angry at the classic American question: “What do you do for a living?” and so on.

小题1:You should learn about _______ of the country if you want to go to another country.

A.the people and the food

B.the culture and customs

C.the language and people

D.the behavior and conversations小题2:A Japanese meet you for the first time, he/ she will ________.

A.shake hands with you

B.hug with you

C.kiss you

D.bow to you小题3:In Bulgaria, shaking your head usually means______________.

A.yes

B.no

C.victory

D.calm down小题4:Which of the following isn’t right?

A.You can’t wear shorts in public in most parts of the world.

B.You can use body language to communicate with people.

C.You can use your left hand to touch food when you eat with Muslims.

D.You can get along well with people you visit if you know their culture and customs well.

单项选择题