Linked List-K Append

This is my code kindly rectify my code and let me know where is the error

you did not handle k=0 and k=n case.

update code: https://ide.codingblocks.com/s/211711

please rate and resolve if satisfied.
thanks

Thanks a lot for finding the error

please rate and resolve it if satisfied.