问题 填空题

下面程序的输出结果是______。 main() {int i=0,a=0; while(i<20) { for(;;) { if((i%10)==0)break; else i--;} i+=11; a+=i; } printf("%d\n",a); }

答案

参考答案:32

解析: while(表达式)的功能是:首先计算表达式的值.若为真,则执行循环体语句,执行完毕,再计算表达式的值.若仍为真,则重复执行循环体语句,直到表达式的值为假,结束while语句的执行,继续执行while语句后面的语句;i=0时满足循环条件,也满足if的条件,执行语句得i=11,a=11,第2次循环不满足if的条件,执行i--,i=10,执行i+=11;a+=i后,得i=21,a=32,不满足i<20,循环结束。

判断题
阅读理解

“Mum, what does it mean when someone tells you that they have a skeleton (骨骼) in the closet (衣橱)?” Jessica asked. “A skeleton in the closet?” her mother paused thoughtfully. “Well, it's something that you would rather not have anyone else know about. For example, if in the past, someone in Dad's family had been arrested for stealing a horse, it would be 'a skeleton in his family's closet'. He really wouldn't want any neighbor to know about it.”

“Why pick on my family?” Jessica's father said with anger. “Your family history isn't so good, you know. Wasn't your great-great-grandfather a prisoner who was transported to Australia for his crimes?”“Yes, but people these days say that you are not a real Australian unless your ancestors arrived as prisoners.”“Gosh, sorry I asked. I think I understand now,” Jessica cut in before things grew worse.

After dinner, the house was very quiet. Jessica's parents were still quite angry with each other. Her mother was ironing clothes and every now and then she glared at her husband, who hid behind his newspaper pretending to read. When she finished, she gathered the freshly pressed clothes in her arms and walked to Jessica's closet. Just as she opened the door and reached in to hang a skirt, a bony arm stuck out from the dark depths and a bundle of white bones fell to the floor. Jessica's mother sank in a faint (晕倒), waking only when Jessica put a cold, wet cloth on her forehead. She looked up to see the worried faces of her husband and daughter.

“What happened? Where am I?” she asked. “You just destroyed the school's skeleton, Mum,” explained Jessica. “I brought it home to help me with my health project. I meant to tell you, but it seemed that as soon as I mentioned skeletons and closets, it caused a problem between you and Dad.” Jessica looked in amazement as her parents began to laugh madly. “They're both crazy,” she thought.

小题1:According to Jessica's mother, “a skeleton in the close” means ________.

A.a family honor

B.a family secret

C.a family story

D.a family treasure小题2:What can we learn about some Australians' ancestors from Paragraph 2?

A.They were brought to Australia as prisoners.

B.They were the earliest people living in Australia.

C.They were involved in some crimes in Australia.

D.They were not regarded as criminals in their days.小题3:Why did Jessica bring a skeleton home?

A.She was curious about it.

B.She planned to keep it for fun.

C.She needed it for her school task.

D.She intended to scare her parents.小题4: Jessica's parents laughed madly at the end of the story probably because ________.

A.they were crazy.

B.they were over excited.

C.they realized their misunderstanding.

D.they both thought they had won the quarrel.