Working on hackerblocks but giving segmentation fault here

@dwivedi.ankit21,
Line 49: while(tail->next!=NULL) {

You cannot access tail->next without ensuring tail is not null, other wise you will be trying to access next of a NULL pointer.

1 Like