在一个list中增加一个节点
typedef struct _list_t
{struct _list_t *next;int data;
}list;void insert_node(list *head, int i, char x)
{list *p = head, *q = NULL;int j = 0;if ((NULL == head) || (0 >= i)){return ;}while ((NULL != p) && (j < i-1)){j++;p = p->next;}if (NULL != p){q = (list *)malloc(sizeof(list));memset(q, 0, sizeof(list));q->data = x;q->next = p->next;p->next = q;}
}