KPIT Technologies interview question

I was asked to write code in C,reversing a string.