单链表逆序打印!
单链表打印的时候
一般
if (p== NULL)
return;
printf("%d ",p->data );
reverse_show(p->next);
结果:
123456
就可以依次打印了
但是如果把打印语句放在后面 就会逆序打印
if (p== NULL)
return;
reverse_show(p->next);
printf("%d ",p->data );
结果
654321
这是因为退出的时候 是从后面进行的!