问题 填空题


阅读以下说明和C语言函数,将应填入 (n) 处的字句写在答题纸的对应栏内。
[说明]
一棵非空二叉树中“最左下”结点定义为:若树根的左子树为空,则树根为“最左下”结点:否则,从树根的左子树根出发,沿结点的左孩子分支向下查找,直到某个结点不存在左孩子时为止,该结点即为此二叉树的“最左下”结点。例如,下图所示的以A为根的二叉树的“最左下”结点为D,以C为根的子二叉树中的“最左下”结点为C。


二叉树的结点类型定义如下:
typedef struct BSTNode{
int data;
struct BSTNode *1ch,*rch; /*结点的左、右孩子指针*/
}*BSTree;
函数BSTree Find_Del(BSTree root)的功能是:若root指向一棵二叉树的根结点,则找出该结点的右子树上的“最左下”结点*p,并从树下删除以*p为根的子树,函数返回被册除子树的根结点指针:若该树根的右子树上不存在“最左下”结点,则返回空指针。
[函数]
BSTree Find_Del(BSTree root)
{
BSTree p,pre;
if (!root)return NULL; /*root指向的二叉树为空树*/
(1) ; /*令p指向根结点的右子树*/
if (!p) return NULL;
(2) ; /*设置pre的初值*/
while (p->1ch) {
pre=p;p= (3) ;
}
if ( (4) ==root) /*root的右子树根为"最左下"结点*/
pre->rch=NULL;
else
(5) =NULL; /*删除以"最左下"结点为根的子树*/
return p;
}

答案

参考答案:pre=root

阅读理解

阅读理解。

     "Life is speeding up. Everyone is getting unwell." This may sound like something someone would say

today. But in fact, an unknown person who lived in Rome in AD 53 wrote it.

     We all love new inventions. They are exciting, amazing and can even change our lives. But have all these

developments really improved the quality of our lives?

      Picture this, You're rushing to finish your homework on the computer. Your mobile phone rings, a

QQ message from your friend appears on the screen, the noise from the television is getting louder and

louder. Suddenly the computer goes blank and you lose all your work. Now you have to stay up all night

to get it done. How happy do you feel?

      Inventions have speeded up our lives so much that they often leave up feeling stressed and tired. Why

do you think people who live far away from noisy cities, who have no telephones, no car, not even any

electricity often seem to be happier? Perhaps because they live simpler lives.

     One family in the UK went "back in time" to see what life was like without all the inventions we have

today. The grandparents, with their daughter, and grandsons Benjamin, 10 and Thomans, 7, spent nine

weeks in a 1940s house. They had no washing machine, microwave, computer or mobile phones. The

grandmother, Lyn, said, "The more things you have, the more difficult life becomes." The boys said they

fought less. Probably, they said, because there was less to fight over, such as their computer. Benjamin

also noticed that his grandmother had changed from being a "trendy, beer-drinking granny, to one who

cooked things"

1. The writer uses the quote(引用) at the beginning of the story to _____. [ ]

A. tell us a truth about our live

B. tell us what life was like long time ago

C. point out what causes such a thing to happen

D. point out that you experience some big problems and they may be the same

2. In the passage the writer describes a picture to show that new inventions _____. [ ]

A. have speeded up our lives

B. have improve the quality of our lives

C. may make people feel very happy

D. may bring people some trouble

3. The family chose to spend some time in a 1940s house because _____. [ ]

A. they loved to live simple lives

B. they wanted to know how people lived withour modern inventions

C. they were troubled by modern inventions

D. living in a different time would be a lot of fun for them

4. According to the passage, which is NOT right? [ ]

A. People who live far away from noisy cities often seem to be happier.

B. An unknown Roman was sure that the quality of life would get better.

C. The family had some changes when they lived in a 1940s house.

D. With the improvement of our lives, we often feel stressed and tired.

5. The passage is mainly about _____. [ ]

A. problems with technology

B. improvements of our lives with technology

C. changes happening to technology

D. the importance of technology

单项选择题 B1型题