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:


#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

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 *