Linked List k_ append

My code : https://ide.codingblocks.com/s/52081
Question : https://hack.codingblocks.com/contests/c/587/316
Only 2 test cases are getting passed. Pl guide

Hey Shubham, it is mentioned in the problem that k >= n, So your code will not work when k>n, handle that case also.

Sir, i have a doubt regarding the output when k>n. If the list is 1 2 3 4 , here n=4 and if k=5 what will be the output. Will it be 1 2 3 4 5 only or something else.

Hey Shubham, if n=4, k=5 and array elements are 1 2 3 4 then the resultant array will be 4 1 2 3. When k>n then the no. of rotations will be k%n;