K reverse linked list

Hi my code is showing segmentation fault. Please let me know the error in my code please don’t send other answers.

@akankshatanwar1701
I am unable to unstand your logic. Why have to iterate from s=0 to s=size/k. Again inside you iterate till k. Could you please tell me why are you trying to do here.

Hi! Please try to dry run the code on paper once. For your reference I am attaching a picture here.