> and also made there previous nodes point to their next node ?
you did not.
`pre = p', `p' is going to be deleted, `pre' points to `p', not to the previous node.
Line 84: pre is not pointing to the previous node. It's pointing to the current node.
Line 94: You're setting p->next to itself. You're not modifying the previous instance.
Lines 17-18: You appear to be declaring a doubly linked list, but you're not maintaining the fwd/back pointers correctly.
Lines 17-18: You appear to be declaring a doubly linked list, but you're not maintaining the fwd/back pointers correctly.
@AbstractionAnon : Thanks for pointing out , though I was trying to implement a singly linked list only . The last pointer was only to keep track of the end . I have not maintained it as I did not need it till now . Thanks anyways .