chinaunix网友2008-02-25 11:13:05
真受不了你,搞这么罗罗嗦嗦干嘛?
struct node {
int data;
struct node* next;
};
struct node* reverse_link(struct node* p)
{
struct node* pr = NULL;
struct node* tmp;
while (p) {
tmp = p->next;
p->next = pr;
pr = p;
p = tmp;
}
return pr;
}