[ad_1]
Consider the case when you insert at the end of the list. Then you get
// current = NULL
current->next = nextnode;
// is ((struct node*)NULL)->next = nextnode;
[ad_2]
solved I am getting Segmentation fault (core dumped) for below code.Please help me out [closed]