问题
填空题
main()
int k,p;
int s[]=1,-9,7,2,-10,3;
for(p=0,k=p;p<6;p++)
if(s[p]>s[k])k=p;
printf("%d\n",k);
程序运行结果是:______
答案
参考答案:B
解析: 该程序求出数组中最大元素的下标。
main()
int k,p;
int s[]=1,-9,7,2,-10,3;
for(p=0,k=p;p<6;p++)
if(s[p]>s[k])k=p;
printf("%d\n",k);
程序运行结果是:______
参考答案:B
解析: 该程序求出数组中最大元素的下标。
阅读理解。 |
One afternoon when the lessons were over, Peter and Paul did not go home. They stayed at school to help their teacher. They worked for an hour. When the boys reached home, it was seven o'clock. It was dark outside, but there was light inside their home and the door was open. "Who can it be?" said Peter. "Mother and father have gone to do some shopping. They won't be home until 8 o'clock." When the man saw Peter, he smiled and said, "Come in ! You don't know me, but I am your father's friend. He asked me to get some money for him." The man did not see Paul. Peter went inside and began talking to the man, but Paul did not. He quickly but quietly went away to call a policeman. The policeman came and caught him. |
1. Peter and Paul stayed behind after school____. A. until the school was over B. until 7 o'clock C. until 8 o'clock 2. Their home was bright because____. A. it was still early B. there was light C. it was dark outside 3. Peter and Paul____. A. were happy to see the man B. were afraid of the man C. tried to catch the man 4. Paul called____ to catch the man . A. their teacher B. their mother C. a policeman 5. From the story, we know____. A. the man inside Paul's home was a thief B. Peter called the policeman C. Their parents wend shopping, but they didn't take enough money with them. |