i want to reverse doubly linked list. this is the code i tried but its not working. it is printing only first value. i have passed first node to this function.
please help me and correct my codeCode:reverse(node *t) { while(t!=NULL) { temp=t->next; t->next=t->prev; t->prev=temp; t=t->prev; } }