next=NULL" /> next=NULL" />

全文预览

c程答案(Ccourseanswer)

上传者:塑料瓶子 |  格式:pdf  |  页数:39 |  大小:2284KB

文档介绍
come from[20];\rstruct student *next;\r) W\rvoid main()\r{\rstruct student *head, *p, *q, *tail;\rint N, i ;\r//øóôÐÑïÒÓ\rscanf("%d", &N);\rhead= (struct student*)malloc(LEN);\rhead->next=NULL;\rtail=head;\rfor(i=l;i<=N;i++).\rp=(struct student*)malloc(LEN);\rscanf ( %I64d %c %s %s”, &p->num, &p->sex, p->name, p->come_f\rrom);\rtail->next=p;\rtail=p;\r)\rtail->next=NULL;\r-×Zùúû'm'H¢£\rq=head;\rp=head->next;\rwhile (p!=NULL)\r(\rif (p->sex== m')\r{\rq->next=p->next;\rfree (p);\rp=q->next;\r}\relse\r{\rq=p;\rp=p->next;.\r-‡ïÒÓ\rp=head->next;\rwhile(p!=NULL)\r(\rprintf (z %I64d %c %s %s\n//, p->num, p->sex, p->name, p->come_\rfrom);\rp=p->next;

收藏

分享

举报
下载此文档