Pergunta de entrevista da empresa Qualcomm

Swap the order of a string without using indexes.

Respostas da entrevista

Sigiloso

27 de out. de 2011

guess it is string reversal with out using `[]' void reverse(char * src) { char * end; end = strlen(src) - 1; char t; while(src < end) { t = * src; *src = *end; *end = t; src++; end--; } }

Sigiloso

13 de jul. de 2017

Small correction to above code end = src + strlen(src) - 1;