Pergunta de entrevista da empresa Qualcomm

void foo(char*a, char*b){ while(*a++ = *b**); return; } int main(){ char buf[20]; foo(buff,"Hello"); printf("%s",buff); } what is the output for this program?

Respostas da entrevista

Sigiloso

31 de out. de 2013

There are two typos in the question corrected question below void foo(char*a, char*b){ while(*a++ = *b++); return; } int main(){ char buf[20]; foo(buf,"Hello"); printf("%s",buff); } out put: Hello

2

Sigiloso

26 de fev. de 2010

Are you sure it is while(*a++ = *b**); not while(*a++=*b++)

1