Why my code is getting runtime error?

I have done same as given instructions but then also getting error . here’s my code (“https://ide.codingblocks.com/s/102920”) … please help me in finding error ,and please tell me how to do after reversing k elements.

I have modified your code a little bit, plz try to submit now,