The International Obfuscated C Code Contest (abbreviated IOCCC) is a computer programming contest for the most creatively obfuscated C code. Held annually in the years 1984–1996, 1998, 2000, 2001, 2004–2006, 2011–2015 and then in 2018, it is described as “celebrating [C’s] syntactical opaqueness”.
Entries are evaluated anonymously by a panel of judges. The judging process is documented in the competition guidelines and consists of elimination rounds. By tradition, no information is given about the total number of entries for each competition. Winning entries are awarded with a category, such as “Worst Abuse of the C preprocessor” or “Most Erratic Behavior”, and then announced on the official IOCCC website. The contest states that being announced on the IOCCC website is the reward for winning.
Jim Hague was the winner of IOCCC in 1986 with a program that implements the international morse standard, as we see in the below image the use of similar variables can be obfuscating on his code (
We can compile it using
gcc hague.c -o hwhich generates the executable file named h, if we run the program
./hwe could enter a text and recive the morse code for that code:
If we observed carefully the code we can notice that it has several macros defined in the program that will be replaced in the preprocessor process, for example,
#define DIT (, that will replace the macro DIT on the program by ‘(‘ or
#define DAHDIT forwill replace DAHDIT by for.