问题 填空题

阅读以下函数说明和C语言函数,将应填入 (n) 处的字句写在对应栏内。
[说明1]
L为一个带头结点的循环链表。函数LinkList deletenode(LinkList L,int c)的功能是删除L中数据域data的值大于C的所有结点,并由这些结点组建成一个新的带头结点的循环链表,其头指针作为函数的返回值。
[C函数1]
LinkList deletenode(LinkList L,int c)
LinkList Lc,P,pre;
pre=L;
p= (1) ;
Lc=(LinkList)malloc(sizeof(Listnode));
Lc->next=Lc;
while(P!=L)
if(p->data>C)
(2) ;
(3) ;
Lc->next=p;
p=pre->next;

else
pre=p;
p=pre->next;

return Lc;

[说明2]
递归函数dec_to_k_2(int n,int k)的功能是将十进制正整数n转换成[*]进制数,并打印。
[C函数2]
dec to k 2(int n,int k)
if(n!=O)
dec to k 2( (4) ,k);
printf("%d", (5) );

答案

参考答案:pre->next或L->next (2) pre->neXt=p->next (3) p->next=Lc->next
(4) n/k (5) n%k

解析:
函数1是考察链表的删除和插入的操作。(1)空所在语句是对指针P赋初值,应填“pre->next”或“L->next”,通过下面的程序可以判断指针pre所指的结点是指针p所指结点前驱结点。(2)、(3)空所在的语句块是处理当指针p所指的结点是一个大于C的结点,则将该结点从链表L中删除,再将它插入到链表Lc中。分别填“pre->next=p->next”和“p->next=-Lc->next” 。
函数2是一个递归函数,采用除k取余法。最开始得到余数作为k进制数的最低位,最后得到的余数作为k进制数的最高位。用递归法求解时,先将n/k转换成k进制,再输出n%k。因此(4)填“n/k”,(5)填“n%k”。

阅读理解

阅读理解

     Betty、Anne、Marilyn、Margaret和Kitty各自打算选购一款dish soap.第1至5题是他们的个

人情况介绍.阅读下面六件产品的简介(A、B、C、D、E和F),选出符合各人需要的最佳选项,选项中有一项是多余选项.zxx

    1. Betty runs a bed and breakfast somewhere in the picturesque countryside. She's planning to

purchase an eco-friendly dish soap with the natural fragrance of aloe. If the producer cares about nature

conservation, she will put more trust in this brand.

     2. Anne is a full-time housewife who always manages to live within her means. For example, she

prefers to choose the dish soap that holds out for very long. Besides, the soap with the fragrance of

flowers or fruit is much more to her taste.

    3. Marilyn works as a regional representative of a major company. Occupied with her business as she

is, she often spares some time after work to prepare some desserts. She is keen on trying something new; she is allergic to certain flower and fruit fragrant scents. She needs a dish soap with no harm to her skin.

    4. Margaret has just moved in a fully furnished apartment. But the cupboard in the kitchen is relatively

smaller. Thus, she will have no other alternative but to purchase smaller dining items, such as dish soap in

a smaller bottle. Furthermore, she is an environmental activist.

     5. Kitty serves as a kitchen steward of a fancy restaurant, in charge of cleaning large quantities of oily

dishes every day. She suggests the owner select a dish soap worth the money. It is, by all means, an ideal

choice for her if it features super cleaning power and meanwhile can keep the hands soft, but not dry.

     A. Life Tree Dish Soap

     A few drops of Life Tree Dish Soap will do a nice job on dishes. It comes in a smaller bottle than

other dish soaps, which makes it more convenient for users. Life Tree does not use animal ingredients and

is without a smell. So if you're looking for a really environmentally friendly dish soap, look at Life Tree.

     B. Method Dish Soap

     Method Dish Soap works safely when used to wash dishes. It is concentrated, so a little goes a long

way. You just need to lift and squeeze it to get a small amount of the soap from the bottle. The soap

comes in various fruit fragrances (香味), such as orange and green apple.

     C. Bio Pac Dish Soap

     Bio Pac Dish Soap , with aloe (芦荟) and tea tree oil, has a fresh smell. It contributes a lot to green

cleaning, for it is made of natural ingredients. What's more, the company gives 10 percent of its profits to

wilderness protection.

    D. Seventh Generation Dish Soap

     Seventh Generation Dish Soap cleans as well as any other soap. Also, it's very environmentally friendly. The product is gentle on your hands. For those who are sensitive to certain fragrances, like flowers and

fruit, Seventh Generation is a great choice.

     E. Citrus Fresh Dish Soap

     Pleasantly fresh and cheap, the wonderful formula (配方) of the soap delivers extraordinary cleaning

power to handle even the most difficult jobs. But with extras of aloe, calendula and other natural skin

softeners, it actually helps prevent skin dryness and trouble while you do the dishes.

F. Dish Soap-Mint Sage, 16 oz

    An all-natural dishwashing soap that has long-lasting suds (泡沫) cleans without the harsh ingredients

in it that can irritate (刺激) sensitive skin. This unique dish soap contains natural borax and the fragrance

of flowers that work together to make things clean.

单项选择题 A1型题