C语言实验报告参考答案

q=p; p=p->next; } if(p==q) {

t->next=p; h=t; } else {

t->next=p; q->next=t; } } p=h;

while(p!=NULL) { i++; p->order=i; p=p->next; }

printf(\ return h; }

/*index by number*/ STUDENT *index(STUDENT *h) {

STUDENT *p,*q,*t,*h1; h1=h->next; h->next=NULL; while(h1!=NULL) { t=h1; h1=h1->next; p=h; q=h;

while(strcmp(t->no,p->no)>0&&p!=NULL) { q=p; p=p->next; }

if(p==q) {

t->next=p; h=t; }

else {

t->next=p; q->next=t; } }

printf(\ return h; }

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4