Pregunta de entrevista de Exelis

how do you reverse a string?

Respuestas de entrevistas

Anónimo

16 de ene de 2011

1. Create an array of characters with size of a given string for storing a reversed characters. 2. Convert a given string into an array of characters. 3. Loop through an array of characters from last character to first character storing a character into an array created in step 1. 4. Convert an array which hold a reversed characters into a string

Anónimo

2 de sept de 2010

you can look up the answer online.