2 ms·
Except that "0123456789abcdef"[x & 0xf] is just normal array dereferencing syntax, not the backwards kind you pointed out. The backwards version would be (x & 0
by mikeash 14y ago
Except that "0123456789abcdef"[x & 0xf] is just normal array dereferencing syntax, not the backwards kind you pointed out. The backwards version would be (x & 0xf)["0123456789abcdef"], which isn't really useful, I think.
Oh well. If you happen to find the funny but semi-legitimate one, I'd love to see it.
- edanm 14y agoYou're right - that is the normal way (although not commonly seen). I'll update if I find it.
- greyfade 14y agoIt was used in one of the early winners of the IOCCC: http://www.ioccc.org/1984/anonymous.c http://www.ioccc.org/1984/anonymous.c It's rumored to have been written by either Kernighan or Ritchie.