Question d’entretien chez Tech Mahindra

Write a code to reverse a string?