国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
鏈表(數(shù)據(jù)結(jié)構)

#include "malloc.h"
#include "stdio.h"
#define  NULL  0
struct LO
{int  data;
 struct LO *next;
};
struct LO *creat(void)
{struct LO  La,*head,*p1,*p2;
 int i,j,n=0;i=0;
 p1=p2=malloc(sizeof(struct LO));
 p1->data=0;
 p1->next=NULL; printf("please input a number\n");   head=P1;
 while(i<m)
 {p2=malloc(sizeof(stuct LO));
  scanf("%d",&p1->data);
  p2->next=NULL;  p1->next=p2;p1=p1->next;
 }
 return(head);
}
void insert(struct LO*head,int i,int e)
{struct LO *p0,*p1,*p2;
 int j=0;
 p0=malloc(sizeof(struct LO)); p1=head;
 if(head==NULL){head=p0;p0->next=NULL;}
 eles{while(p1->next!=NULL&&j<=i-1)
      {p1=p1->next,++j;}
 p0->data=e;p0->next=p1->naxt;p1->next=p0;}
}
void del(structLO*head,int i)
{struct LO *p1,*p2;  int j
 p1=head;j=0;
 while(p1->naxt&&j<i-1)
{p1=p1->next;j++;
 }
q=p1->next;p->next=q=>next;
e=q->data;free(q);printf("%d",e);
}
main()
{stuct LO LA,LB,*p;
inti.j.m,e;
m=structLO*creat(void);
putchar();
printf("please inpput the number");
scanf("%d%d",&i,&e);
strict LO*insert(stuct LO *m,int i,int e)
printf("please input a number");
scanf("%d",&j);
if(i!=5)printf("error\nplease input a  rigth number");
else void del(struct LO *head,int i);
}

 

本站僅提供存儲服務,所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權內(nèi)容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
劍指offer之用鏈表實現(xiàn)棧(帶頭節(jié)點)
單向鏈表、雙向鏈表,棧,隊列的C語言的實現(xiàn)方法
c語言
049.基數(shù)排序
7-2 兩個有序鏈表序列的合并
用指針實現(xiàn)高低位倒序,瘋了吧
更多類似文章 >>
生活服務
分享 收藏 導長圖 關注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服