Linked List- K reverse

my code is not running,error is segmentation fault .Plz tell what’s the issue. Here’s the code:

I have edited your code… try to submit now…

plzz tell y my code gave error segmentation fault?

I have added comments in the code for the lines I have changed… Pls see to the code again as :