单向链表的倒序 2011.11.04

来源:互联网 发布:软件设计师辅导书 编辑:程序博客网 时间:2024/05/21 17:23
struct stud{int n;stud * next;};struct stud *fanxu(struct stud *head) { stud *a, *b, *c;a = head;c = NULL;while (a != NULL){b = a->next;a->next = c;c = a;a = b;}return c;}