C language Interview Questions | Glassdoor

C language Interview Questions

2

interview questions shared by candidates

C language Interview Questions

Sort: Relevance Popular Date

What does this obfuscated C language statement do?

1 Answer

The statement was likely the worst C code I've ever seen...not something you would ever want to do. I can't remember it well enough to reproduce it here. I started my answer with something like "Who in his right mind would write code like this?!?" It was so obfuscated that I could not tell exactly what the output would be, but I parsed it enough to satisfy the team member.

char a[] = { 0x0a,0x0b,0x0c,0x0d} x = *(int)*a++ y = *(int*)a++ A = *a++ B = (*a)++

12 of 2 Interview Questions