Hello all,
Please help me.
I have write a serial link list program.Here i can delete node at any location except at location 1(head).
Please tell me where i am going wrong ?
head of link list is at location 1.
please give me a hint.
Thanks,Code:void deletenode(node**ptr,int loc) { node *temp,*s,*r; s = *ptr; if(count(*ptr)<loc) { printf("\n out of list"); } else { while(loc>1) { temp = s; s= s->next; loc--; } temp->next = s->next; } }
Gunjan