Pergunta de entrevista da empresa Apple

In C, say you had the string "Hello". Describe how you'd output the string backwards.

Resposta da entrevista

Sigiloso

27 de dez. de 2015

void print_reverse (char *s) { char *tmp = s; if (!s) return; while (*s) s++; while (s != tmp) printf ("%c", *--s); return; }

2