Amadeus interview question

reverse string using c