数据结构的链表插入的实验

csdn38442 35 0 2019-01-10 22:01:40

{int num;char str[20]; stuuct node*next; }; struct node*insert(head,pstr,n) struct node*head; char*pstr;int n; {sruct node*p1,*p2,*p3; p1=(struct node*)malloc(sizeof(struct node)) strcpy(p1->str,pstr); p1->num=n;p2=head; if(head==null) { head=p1;p1->next=null;} else{ while(n>p2->num&&p2->next!=null)

用户评论
请输入评论内容
评分:
暂无评论