全国计算机二级语言改错题题库.docVIP

  • 15
  • 0
  • 约6.47万字
  • 约 75页
  • 2016-10-20 发布于广东
  • 举报
全国计算机二级语言改错题题库

2011年9月上机改错题 1、 #include stdio.h #include stdlib.h typedef struct aa { int data; struct aa *next; } NODE; int fun ( NODE *h ) { int max=-1; NODE *p; /***********found**********/ p=h ; p=h-next; /*h指向的是头节点,题目要求不要头节点,那么我们从第2个结点开始*/ while(p) { if(p-datamax ) max=p-data; /***********found**********/ p=h-next ; p=p-next; /*链表中的指针后移*/ } return max; } outresult(int s, FILE *pf) { fprintf(pf,\nThe max in link : %d\n,s);} NODE *creatlink(int n, int m) { NODE *h, *p, *s; int i;

文档评论(0)

1亿VIP精品文档

相关文档