Linked List K append

The code is not giving any output.

@Chirag-Jain-1414278322030453 You are making n zero in while loop and you are then trying to use it again.
Store the value of n in some variable to that it can be used later.
You are not updating head again.
temp->next = head;
head=curr;
Add the last line.
Also take care of the case when k>n
If this resolves your doubt mark it as resolved.

I made the necessary changes but still some testcases are failing. Link : https://ide.codingblocks.com/s/211111

@Abhinav2604 to handle the case when k>n, we need to make k=k%n. (if k is a multiple of n then only even after performing the operation linked list remain same, else we will have changes)
If this resolves your doubt mark it as resolved.