我试图通过链接和地址而不是值来改变链表中的升序
struct node { char name[30]; int percent; struct node *link; }; int main { clrscr(); randomize(); struct node *st; st=NULL; for(int i=0;ipercent display(st); AscMarks(&st); //Changing the order of links and addresses to arrange them in ascending order printf("nAscending order list...n"); display(st); getch(); return 0; } /*Adds a node at the end of a linked list */ void append(struct node **q,int per) { struct node *temp,*r; temp=*q; /* If the list is empty , create first node */ if(temp==NULL) { temp=(node*)malloc(sizeof(struct node)); temp->percent=per; getName(temp->name); temp->link=NULL; *q=temp; } else { while(temp->link!=NULL) temp=temp->link; r=(struct node*)malloc(sizeof(struct node)); r->percent=per; getName(r->name); r->link=NULL; temp->link=r; } } /*Displays the contents of the linked list */ void display(struct node *q) { while(q!=NULL) { printf("%dt%sn",q->percent,q->name); q=q->link; } } void getName(char *c) { for(int i=0;i<30;i++) { if(i==10||i==20) *(c+i)=' '; else *(c+i)=(char)((random(26)+97)); } *(c+i+1)='