Linked List -K reverse code run error

i am getting ERROR! in my code.
not specifically mentioned what error

Hello @anishmittal

Save your code on ide.codingblocks.com and share the link from the address bar here.

@anishmittal

Your logic for kReverse is wrong.
What to do in this question is:- reverse the linked list in the batches of size k
Example
10 3
1 2 3 4 5 6 7 8 9 10
output: 3 2 1 6 5 4 9 8 7 10

Here is the modified code