全文预览

全国计算机二级C语言库

上传者:梦溪 |  格式:pdf  |  页数:86 |  大小:7886KB

文档介绍
nmax;\r)\routresult(ints,FILE*pf)\r{fprintf(pf,"\nThemaxinlink:%d\n",s);EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\rNODE*creatlink(intn,intm)\r{NODE*hz*pz*s;\rinti;\rh=p=(NODE*)malloc(sizeof(NODE));\rh->data=9999;\rfor(i=l;i<=n;i++)\r{s=(NODE*)malloc(sizeof(NODE));\rs->data=rand()%m;s->next=p->next;\rp->next=s;p=p->next;\r)\rp->next=NULL;\rreturnh;\r)\routlink(NODE*h,FILE*pf)\r{NODE*p;\rp=h->next;\rfprintf(pf,"\nTheLIST:\n\nHEAD");\rwhile(p)\r{fprintffpf,"->%d",p->data);\rp=p->next;}\rfprintf(pf,"\n")F\r)\rmain()\r{NODE*head;intm;\rsystem("CLS");\rhead=creatlink(12,100);\routlink(head,stdout);\rm=fun(head);\rprintf("\nTheRESULT:\n");\routresult(m,stdout);\r)\rHIJKLM\rN,-:pOh;+2:p=h->next;\rP,-:pOh->next;+2:p=p->next;\r<PIXTEL_MMI_EBOOK_2005>3\r</PIXTEL_MMI_EBOOK_2005>QRIJ

收藏

分享

举报
下载此文档