Pergunta de entrevista da empresa Infogain (India)

One of the questions asked was to write a program to reverse a string.