by unwind · 13y ago · 0 comments
main(O){10<putchar(4^--?77-(15&5128>>4*O):10)&&main(2+O);}
I enjoyed the extra mini-confusement from using a capital O as a variable name. :)I believe there is a mistake in this snippet of code: `--` triggers a syntax error. Shouldn't it be
main(O){10<putchar(4^--O?77-(15&5128>>4*O):10)&&main(2+O);}
My obfuscated C experience being quite limited, could you tell me how you determined all those magic values in order to print the right string?Thank you
I had to double-check that it's right in my profile on Stack overflow (which is where I copied it from for the above comment), but it is. That's even stranger.
Essentially, it's a loop that unpacks my name and prints it, letter by letter, from the constant 5128. Four bits is being used per letter, and I tried to compress the number by subtracting an offset from the ASCII codes of each letter (that's the 77).
It's been ~14 years or something since I first wrote this, and I'm pretty sure I was inspired by an Obfuscated C contest entry then, too. :)
> stordoff@stordoffs-MacBook-Pro:~ $ gcc HN.c && ./a.out
> EMIL
main(O){10<putchar(5^--O?82-(31&4763657>>5*O):10)&&main(2+O);}