Cognizant interview question

reverse a string python vs c