• TOC
  • GigaMess
  • CodeTips
  • Stuff
  • Links
  • Contact

My obfuscated C program collection

  • Maze generator AND solver in 4 lines (max. 77 chars / line) of C code.
  • Christmas tree generator in two lines. Quite easy to understand but the output is very nice.
  • Bonus: Obfuscated 3-line Python program that prints out numbers diagonally. I got the idea from a Brainfuck program I saw. And that one is truly impossible to read.

When you compile these programs, make sure int means signed int and char means signed char, and that your compiler makes all global variables (including arrays) full of 0. Most compilers do this automatically. So you'll probably only need some includes like stdio.h (printf) and stdlib.h (rand) and conio.h.