摘要: #include #include typedef struct node *link;struct node { int item; link next;};/* 初始化一个节点数为n的一个链表*/void init(link a, int n){ int i; for (a, i = 0; i next = malloc(sizeof(*a))); a->item = rand()%100; a->next = NULL; }}/* 遍历链表*/void traverse(link p){ while (p != NULL) ... 阅读全文
posted @ 2013-10-30 00:02 CJin 阅读(624) 评论(0) 推荐(0)