2012年二级C上机题库.pdf

上 机 题 库 第一部分 填空题 注意:源程序存放在考生文件夹下的BLANK1.C中。 1. 不得增行或删行,也不得更改程序的结构! 2. 请在程序下划线处填入正确的内容并把下划线删除,使程序得出正确的结果。 1. 给定程序中,函数FUN的功能是:计算出带有头接点的单向链表中各结点数据域之和作为函数值 返回。 #include stdio.h #include stdlib.h #define N 8 typedef struct list { int data; struct list *next; } SLIST; SLIST *creatlist(int *); void outlist(SLIST *); int fun( SLIST *h) { SLIST *p; int s=0; p=h-next; while(p) { /**********************************f

文档评论(0)

1亿VIP精品文档

相关文档