问题 单项选择题

A.栈为空却要进行出栈操作

B.栈已满却要进行入栈操作

C.表达式处理已结束,栈中仍留有字符“(”

D.表达式处理已结束,栈中仍留有字符“)”

答案

参考答案:A

解析:(33)~(34)

[分析]: 对算术表达式(a+b*(a+b))/c)+(a+b)进行括号检查时,栈操作的顺序为: 入栈,入栈,出栈,出栈,出栈,…… 当需要进行第三次出栈操作时,发现栈已空,已不可能完成出栈操作。 对算术表达式((a+b/(a+b)-c/a)/b进行括号检查时,栈操作的顺序为: 入栈,入栈,入栈,出栈,出栈 第1次出栈操作取出的是第3次刚入栈的“(”,第2次出栈操作取出的是第2次入栈的“(”。直到表达式检查结束,第1次入栈的“(”仍没有取出,因此,表达式中的括号并不匹配。 本例是栈的重要应用之例。编译程序中常用栈来检查语句(或程序)中的括号是否匹配。 在日常生活中,当人们进入一个复杂的大院时,需要多次进门,多次出门。每次出门,总是退出最近进门的院。在同一位置堆积货物时,总是先取最近刚放上的货。所以,栈的应用也是比较常见的。可以用这种日常生活中的例子来形象地理解栈的操作。

阅读理解

阅读理解。

Dear Dr Jackson, 

     My parents are never happy with me. They are always criticizing (批评) my clothes, my hair and the

music I listen to. They hate my friends' looks and they keep complaining when I go with them. I'm not

allowed to stay out as late as my friends do, so I can't have any fun, My parents only seem to care about

my school marks. Although I love them, sonetimes I feel we live in different worlds. If they love me, can't

they understand me? How can I make them understand me? 

                                                                                                                                              Angel

Dear Angel,

     Your problem is common (共同的) to both teenagers and parents. Don't worry, bacause all this is natural.

You see, your parents have grown up at a different time and they have different experiences. So, they think

some things are strange, but you find the same things ordinary. For example, the music you like may sound

like noise to them. Your parents love you, so they feel they must protect you from whatever they find strange.

On the other hand, you don't want to be different from other teenagers, so you feel that your parents restrict

you. 

     I think you should talk about this problem with your parents. Try to explain to them what you want and

make them know they can believe you. Sooner or later. they'll find you are a responsible (有责任心的) person

and they will give you more freedom (自由).

1. Why has Angel written to Dr Jackson? [ ]

A. Because her parents make her happy.

B. Because her parents can't understand her.

C. Because her friends don't like her parents.

D. Because her parents don't think she is good at school.

2. Angel has            than her friends. [ ]

A. more fun

B. less freedom

C. more freedom

D. less clothes

3. What advice does Dr Jackson give to Angel? [     ]

A. Be different from the other teenagers.

B. Don't tell her parents what she wants to do.

C. Take no notice of her parents and do whatever she likes.

D. Discuss her problem with her parents.

4. What does the word "restrict" in the passage mean in Chinese?[ ]

A. 限制

B. 保护

C. 放纵

D. 抛弃

5. Which of the following is TRUE? [ ]

A. According to Dr Jackson, Angel's problem isn't usual.

B. Angel's father likes the music that Angel likes.

C. Angel should show her parents that she is a responsible person.

D. Angel doesn't love her parents at all.

多项选择题 案例分析题