The International Obfuscated C Code Contest

The IOCCC (International Obfuscated C Code Contest) has kicked off again. The goal: solve a relatively simple problem in as difficult a way possible.

Here is a 2004 winner:

#include
#include
#include

#define _ ;double
#define void x,x
#define case(break,default) break[O]:default[O]:
#define switch(bool) ;for(;xint##if?
#define true (–void++)
#define false (++void–)

char*O=” <60>!?\\\n”_ doubIe[010]_ int0,int1 _ Iong=0 _ inIine(int eIse){int
O1O=!O _ l=!O;for(;O1O<010;++o1o)l+=(o1o[doubie]*pow(eise,o1o));return i="1,x=">I?atof(I[eIse]):!O switch(*O)x++)abs(inIine(x))>Iong&&(Iong=abs(inIine(x
)));int1=Iong;main(-*O>>1,0);}else{if(booI<*O>>1){int0=int1;int1=int0-2*Iong/0
[O]switch(5[O]))putchar(x-*O?(int0>=inIine(x)&&do(1,x)do(0,true)do(0,false)
case(2,1)do(1,true)do(0,false)6[O]case(-3,6)do(0,false)6[O]-3[O]:do(1,false)
case(5,4)x?booI?0:6[O]:7[O])+*O:8[O]),x++;main(++booI,0);}}}

What does this crazy code do? It graphs a polynomial. For instance, running it with parameters ‘0 0 2’ will graph y=x^2. Quite noteworthy.

One thought on “The International Obfuscated C Code Contest

Leave a Reply

Your email address will not be published. Required fields are marked *