20th International Obfuscated C Code Contest
What can 33 lines of code do? Ray tracing?
Here are the rules:
- To write the most Obscure/Obfuscated C program within the rules.
- To show the importance of programming style, in an ironic way.
- To stress C compilers with unusual code.
- To illustrate some of the subtleties of the C language.
- To provide a safe forum for poor C code.
I compiled and tried this one:
Compile it:
gcc -o zucker zucker.c -lm
*-lm for linkin math library. Otherwise functions like atan would give error:
zucker.c:(.text+0x43b): undefined reference to `atan2' zucker.c:(.text+0x5ae): undefined reference to `sin' zucker.c:(.text+0x5ce): undefined reference to `cos' zucker.c:(.text+0x9bf): undefined reference to `sqrt' /tmp/ccRJ0Y3C.o: In function `main': zucker.c:(.text+0x14c4): undefined reference to `pow' zucker.c:(.text+0x170b): undefined reference to `pow'
./zucker > hello.ppm
Or we can give the text to write:
./zucker "hakan" > hello2.ppm
Here is the pic created (it is taking a little long don’t worry - it was ppm but i changed it to png):
There is also another one (im too lazy to try this one):