()阅读下列说明和C语言程序,将应填入 (n)处的语句写在答题纸的对应栏内。[说明]设有定义 #define ITEM struct item #define SIZE sizeof(ITEM) ITEM { int num; ITEM *next; }; ITEM *head=NULL; 下述函数定义实现按插表尾形式(即每一新表元素插入至当前所生成链表的表尾之后)生成一个正向线性链表。最后指向所生成链表表头的指针作为函数值返回。为生成一个线性链表,要求输入一批整型数据,并以-1作为结束标志。请填空完善程序。 ITEM *gene(ITEM *head) { ITEM *temp,*tail;/*tail指向当前链表尾结点*/ int intno; printf("Enter integer NO.,-1 to stop:\n"); scanf("%d",&intno); while (intno!=-1) { temp=(____(1)_____)malloc(SIZE); temp->num=intno; if (head==_____(2)_____) /*空表*/ { head=temp; tail=______(3)______; } else /*非空表*/ { ____(4)_______=temp; tail=temp; } scanf("%d",&intno); } return (_______(5)_______);
查看答案
● 在一个具有n个顶点的无向图中,要连通全部顶点至少需要 ()条边。()A.n B.n+l C. n一1 D. n/2
● A project manager believes that modifying the scope of the project may provide added value service for the customer .The project manager should()()A. assign change tasks to project membersB. call a meeting of the configuration control boardC. change the scope baselineD. postpone the modification until a separate enhancement project is funded after this project is completed according to the original baseline
●早期的微机,普遍采用ISA总线,它适合 (1)位字长的数据处理。为了适应增加字长和扩大寻址空间的需要,出现了 (2)总线,它与ISA总线兼容。
(1)A.64 B.16 C.24 D.32
(2)A.STD B.PCI C.EISA D.VESA
● A hard disk (()) much greater storage capacity than a floppy disk.()A. provides B.grasp C.surport D.modify