The_International_Obfuscated_C_Code_Contest The_International_Obfuscated_C_Code_Contest

The International Obfuscated C Code Contest - Definition and Overview

Related Words: Catholic, Civic, Civil, Common, Communal, Cosmopolitan, Ecumenical, Foreign, Galactic, General, Global, National, Nondenominational, Planetary

The International Obfuscated C Code Contest (abbr. IOCCC) is a programming contest for the most creatively obfuscated C code held annually since 1984 (with the exception of 1997, 1999, 2002 and 2003). There are many winning entries each year, and each entry gets a category like "Worst Abuse of the C Preprocessor" or "Most Erratic Behavior".

The IOCCC was started by Landon Curt Noll and Larry Bassel. They were talking together about the horrible code it was their jobs to maintain. They decided to hold a contest for the worst possible C code. Within the code size limit of only a few kilobytes, the contestants manage to do amazing things - 2004 winner was in fact an operating system!

Some quotes from recent entries include,

  • To keep things simple, I have avoided the C preprocessor and tricky statements such as "if", "for", "do", "while", "switch", and "goto".
  • We still aren't sure whether or not this is a useful program, but it's the first atomic fission we've seen in the IOCCC.
  • Why not use the program to hide another program in the program? It must have seemed reasonable at the time.
  • The program implements an 11-bit ALU in the pre-processor.
  • I found that calculating prime numbers up to 1024 makes the program include itself over 6.8 million times.


An example entry would be [1] (http://www0.us.ioccc.org/years.html#1988_westley):

#define _ -F<00||--F-OO--;
int F=00,OO=00;main(){F_OO();printf("%1.3f\n",4.*-F/OO/OO);}F_OO()
{
            _-_-_-_
       _-_-_-_-_-_-_-_-_
    _-_-_-_-_-_-_-_-_-_-_-_
  _-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
  _-_-_-_-_-_-_-_-_-_-_-_-_-_
    _-_-_-_-_-_-_-_-_-_-_-_
        _-_-_-_-_-_-_-_
            _-_-_-_
}

This program calculates pi by looking at its own area; a more accurate value can be received by using a bigger program.

Some ways in which contributions are notable include:

  • The appearance of the source code, which may resemble images, text, etc.
  • Preprocessor redefinitions to make code harder to read
  • Self-modifying code
  • Worst abuse of the rules. In several years, an entry was submitted that was so patently absurd that it required a new definition of some of the rules for the next year. This, of course, is a high honor. An example would be the world's shortest self-reproducing program... the entry was a program zero bytes in length, that if run, printed zero bytes to the screen (this requires some creative use of the makefile to get it right).

Several of the past entries are known to cause some compilers (most notably the otherwise very stable Visual Studio) to crash messily.

External link


Example Usage of International

Eden_Prairie_WX: EE: A Few Clouds and 30 F at Minneapolis-St. Paul International Airport, MN Winds are from the Northwest at 15.0 gustin http://s1z.us/ad.htm
projecthottest: My view, as an International, regarding our 2PM boys performing at a club on Christmas eve....... *still pondering*
Burnsville_Wx: BE: A Few Clouds and 30 F at Minneapolis-St. Paul International Airport, MN Winds are from the Northwest at 15.0 gustin http://s1z.us/ad.htm
Copyright 2009 WordIQ.com - Privacy Policy  :: Terms of Use  :: Contact Us  :: About Us
This article is licensed under the GNU Free Documentation License. It uses material from the this Wikipedia article.