Pergunta de entrevista da empresa Siemens

The question was reversing a string.