Reverse ll in group

my code for the given question is not working please check it once and tell me the error and correction in my code
Question link:: https://practice.geeksforgeeks.org/problems/reverse-a-linked-list-in-groups-of-given-size/1
Code link; https://ide.codingblocks.com/s/106925

hey @sunny.kumar2016, why are you not using reversing by pointer approach that is much more efficient

but what is wrong in this approch please help me out with approch only i will do than by three pointer approch after wards

hey @sunny.kumar2016, the problem is you are not increment the value of i in for loop by four and even you do so you evaluation is starting from first node(head of LL) only but it should start with first node of next K-slot.

can you please make change to my code and tell me that would be a great help.comment it wherever you make changes.

hey @sunny.kumar2016, you are just sharing me the function, please share the complete code so that I can check it for multiple inputs.

Sir its a functional problem on geeks i have sent you the question link

hey @sunny.kumar2016, here is your updated code. https://ide.codingblocks.com/s/65958

Hackerblocks has same problem https://hack.codingblocks.com/contests/c/511/116
This code is passing all test cases here.