Pergunta de entrevista da empresa Qualcomm

Write strcpy (string copy). What test cases would you have? Write strrev (string reverse) in place. (temp char is fine)

Respostas da entrevista

Sigiloso

2 de mar. de 2012

// strrev char str[] = "Hello World"; j=0; for(i=strlen(str)-1; i<=strlen(str)/2; i--) { temp = str[j]; // swap str[j] = str[i]; str[j] = temp; j++; }

3

Sigiloso

20 de nov. de 2010

This is pretty easy to find the answer online already.