问题 单项选择题

有以下程序:
#include<stdio.h>
main()
int a[5]=1,2,3,4,5,b[5]=0,2,1,3,0,i,s=0;
for(i=0;i<5;i++)s=s+a[b[i]];
printf("%d\n",s);

程序运行后的输出结果是( )。

A.6
B.10
C.11
D.15

答案

参考答案:C

解析: 本题考查数组的使用。本题定义了两个数组,注意数组的下标是从0开始的,进行第1次:for循环:当i=0时,b[0]为数组b中第1个元素,结果为0,那么a[0]也是数组a中第1个元素,结果为1,所以s的值为1。第2次循环:i此时自加为1,b[1]为数组的第2个元素,值为2,所以可求出a[2](数组中的第3个元素)的值为3,s=s+3,所以s的值为4。进入第3次for循环,以此类推,第3次for循环结束时s的值为6。第4次for循环,s的值变为10。第5次for循环时,此时i的值为4,s的值变为11,i=5不符合题意,所以跳出循环,输出结果,所以本题答案为C。

阅读理解

下面文章中有5处需要添加小标题。请从以下选项(A,B,C,D,E和F)中选出符合各段意思的小标题。

A.Get adequate iron

B. Keep yourself hydrated.

C. Get enough calories

D. A little exercise goes a long way.

E. Eat a balanced, varied diet

F. Spread your calories throughout the day.

The Energy Diet

How can I lose weight when every time I go on a diet, I'm so exhausted that I can barely make it through the day? So goes the complaint of many men and women who are concerned about being overweight. What many people don't realize is that a healthful weight-loss plan can actually boost your energy. The key is to eat smart. And then combine this healthful diet with some physical activity. Here are six pointers to get you started.

1.____

Consume too few calories and you'll have less energy, and decrease the amount of calories burned. "That's because one of the ways the body protects itself from starvation is to slow down its metabolism," explains Dr. Donald Hensrud, a nutrition professor at the Mayo Clinic, in Rochester, Minn. So how many calories do you need to feel energized while also slimming down? A healthful weight-loss rate is roughly one-and-a-half pounds per week, and the calorie intake to achieve this depends on your age, weight, and activity level.

2.____

The key to keeping your energy level up when you diet is to eat balanced meals that supply all the nutrients you need. "Vitamins and minerals act like spark plugs," explains Kristine Clark, director of sports nutrition at Pennsylvania State University. "They help release the energy in nutrient-rich food." Try to follow USDA guidelines. They call for 6 to 11 servings per day from the bread, cereal, rice, and pasta group; three to five servings of vegetables; two to four of fruits; two or three of milk or cheese; two or three of meat, fish, or eggs. Avoid fried and creamy dishes, and keep consumption of sweets and desserts to a minimum.

3____

When you go for five to six hours without food, the amount of fuel in your system starts to run low, and you begin to feel tired. Therefore, says Kristine Clark, it's important to eat at regular intervals to keep your energy up. If you exercise, it's important to make sure you have "fuel in the tank" before you head for the gym. Avoid eating a large number of calories at one time, since it's harder to control your total calorie intake, making weight gain more likely.

4____

About 10% of women of childbearing age in the United States are iron deficient. Iron is essential for energy and endurance because it is a vital component of red blood cells, which carry oxygen to working muscles. "Fatigue and listlessness can be directly associated with too little iron," says Frances Berg, a licensed nutritionist in Hettinger, N.D. The best sources of iron are meat, poultry, and some fish. Other sources: fortified cereals, dried beans, dried fruits, and peas.

5____

"I don't have the energy to exercise!" say many dieters. Indeed, a 1998 survey, developed in part by the Center for Sports Medicine at Penn State, found that over 70% of respondents cited "too tired" or "lack of energy" as key reasons to skip exercising. Yet exercise is exactly what these people need. And, lastly, don't try to do too much too soon. Consider breaking your exercise into small units. Instead of trying to do 30 minutes in one chunk, accumulate exercise in short bouts (一场,一回)every day by mowing the lawn, walking to work, or climbing stairs instead of taking an elevator. It won't be long before you reap (收获)the rewards. Imagine carrying a 15-pound sack of groceries around all day. Then think about how much more energy you'd have if you put that sack down.

单项选择题 A1/A2型题