数据结构C语言版单链表源代码.docVIP

  • 19
  • 0
  • 约3.55千字
  • 约 10页
  • 2017-12-20 发布于河北
  • 举报
数据结构C语言版单链表源代码

/*单链表的各种操作*/ #include stdio.h #include malloc.h #define null 0 typedef int ElemType; /* 字符型数据*/ struct LNode { ElemType data; struct LNode *next; }; void setnull(struct LNode **p); int length (struct LNode **p); ElemType get(struct LNode **p,int i); void insert(struct LNode **p,ElemType x,int i); void dele(struct LNode **p,int i); void display(struct LNode **p); int locate(struct LNode **p,ElemType x); void main() { struct LNode *head,*q; /*定义静态变量*/ int select,x1,x2,x3,x4; int i,n; int m,g; char e,y; setnull(head); /*建设链表并设置为空表*/ printf(请输入数据长度: ); scanf(%d,n); for(i=1;i=n

文档评论(0)

1亿VIP精品文档

相关文档