Better way to write ll-k reverse

The question is aubmitted succesfuuly but I want to manage pointers slightly well in this code. All the pointers are slightly confusing for me too.

In this question, you can follow the other approach in which you will have this kind of function as :
node *reverse(node *head,int k)
and you will maintain a count variable initialised to 0 and then take three pointers as
node *current=head;
node *prev=NULL;
node *next=NULL;
and then use a logic we generally use for reversing the list such that at every point count is incremented and reverse the list uptil count reaches k.