Question: WAP to reverse a linklist non-recursively.
void reverse (struct list **list1)
struct list *next, *cur, *tmp;
cur = *list1;
next = cur->next;
tmp = cur;
cur = next;
*list1 = tmp;
Subscribe - To get an automatic feed of all future posts subscribe here, or to receive them via email go here and enter your email address in the box. You can also like us on facebook and follow me on Twitter @akashag1001.