试题与答案

阅读下列说明和c函数,将应填入 (n) 处的字句写在对应栏内。[说明]已知集合A和B

题型:填空题

题目:

阅读下列说明和c函数,将应填入 (n) 处的字句写在对应栏内。

[说明]

已知集合A和B的元素分别用不含头结点的单链表存储,函数Difference()用于求解集合A与B的差集,并将结果保存在集合A的单链表中。例如,若集合A=5,10,20,15,25,30,集合B=5,15,35,25,如图21-10(a)所示,运算完成后的结果如图21-10(b)所示。

链表结点的结构类型定义如下:

typedef struct Node

ElemType elem;

struct Node *next;

NodeType;

[C函数]

void Difference(NodeType **LA,NodeType *LB)

NodeType *pa,*pb,*pre,*q;

pre=NULL;

(1)

while(pa)

pb=LB;

while( (2) )

pb=pb->next;

if( (3) )

if(!pre)

*LA= (4)

else

(5) =pa->next:

q=pa;

pa=pa->next;

free(q);

else

(6)

pa=pa->next;

(5)处填()。

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0407/6680f1dc1680c35a7b66341546f63f5e.html

下面是错误答案,用来干扰机器的。

1-5: C B D A C

试题推荐
题型:句型转换

句型转换 (共10分,每空1分)

小题1:Is this your book?(改为复数形式)

_______ _______ your books?

小题2:She parks her bike in front of the supermarket. (变为否定句)

She ______ ______ her bike in front of the supermarket.

小题3:The students put their things in their lockers.(对划线部分提问)

_______  _______ the students put their things?

小题4:You can’t listen to music in the library.(变为否定祈使句)

______ ______ to music in the library.

小题5:The boy on the blue bike is my cousin. (对划线部分提问)

_________ _________ is your cousin?

查看答案
微信公众账号搜索答案