Sponsored Links
-->

Sunday, December 31, 2017

Previous IOCCC Winners
src: www.ioccc.org

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, and then since 2011, it is described as "celebrating [C's] syntactical opaqueness". The winning code for the 22nd contest, held in 2013, was released in January 2014.

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 award for winning.


Video International Obfuscated C Code Contest



History

The IOCCC was started by Landon Curt Noll and Larry Bassel in 1984 while employed at National Semiconductor's Genix porting group. The idea for the contest came after they compared notes with each other about some poorly written code that they had to fix, notably the Bourne shell, which used macros to emulate ALGOL 68 syntax, and buggy version of finger for BSD. The contest itself was the topic of a quiz question in the 1993 Computer Bowl. After a hiatus of five years starting in 2006, the contest returned in 2011.

Compared with other programming contests, the IOCCC is described as "not all that serious" by Michael Swaine, editor of Dr. Dobbs.


Maps International Obfuscated C Code Contest



Rules

Each year, the rules of the contest are published on the IOCCC website. Rules vary from year to year and are posted with a set of guidelines that attempt to convey the spirit of the rules.

"Hacking the contest rules is a tradition". Landon Curt Noll, 2011.

The rules are often deliberately written with loopholes that contestants are encouraged to find and abuse. Entries that take advantage of loopholes can cause the rules for the following year's contest to be adjusted.


the development of persian literature by ahura - issuu
src: image.isu.pub


Obfuscations employed

Entries often employ strange or unusual tricks, such as using the C preprocessor to do things it was not designed to do, or avoiding commonly used constructs in the C programming language in favor of much more obscure ways of achieving the same thing. Two contest winners generated a list of prime numbers using the C preprocessor "spectacularly", according to Dr. Dobbs. Some quotes from 2004 winners 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 C preprocessor.

I found that calculating prime numbers up to 1024 makes the program include itself over 6.8 million times.

Contributions have included source code formatted to resemble images, text, etc., after the manner of ASCII art, preprocessor redefinitions to make code harder to read, and self-modifying code. In several years, an entry was submitted that required a new definition of some of the rules for the next year. This is regarded as a high honor. An example is the world's shortest self-reproducing program. The entry was a program designed to output its own source code, and which had zero bytes of source code. When the program ran, it printed out zero bytes, equivalent to its source code.

In the effort to take obfuscation to its extremes, contestants have produced programs which skirt around the edges of C standards, or result in constructs which trigger rarely used code path combinations in compilers. As a result, several of the past entries may not compile directly in a modern compiler, and some may cause crashes.


Page 2 | Lattix
src: lattix.com


Examples

Within the code size limit of only a few kilobytes, contestants have managed to do complicated things - a 2004 winner turned out an operating system.

Below is a 1988 entry which calculates pi by looking at its own area:

(This entry was written in K&R C; it does not work correctly in ANSI C without some change.)

Another example is the following flight simulator, the winner of the 1998 IOCCC, as listed and described in Calculated Bets: Computers, Gambling, and Mathematical Modeling to Win (2001) and shown below:

This program needs the following command line on a Linux system to be compiled:

  cc banks.c -o banks -DIT=XK_Page_Up -DDT=XK_Page_Down \          -DUP=XK_Up -DDN=XK_Down -DLT=XK_Left -DRT=XK_Right \          -DCS=XK_Return -Ddt=0.02 -lm -lX11 -L/usr/X11R6/lib  

News & Views: Subway Reading Archives
src: www.cityandstateny.com


See also

  • Obfuscated Perl Contest
  • Underhanded C Contest

Issue 23: Squares | Bidoun
src: public.bidoun.org


Notes and references




External links

  • IOCCC web site

Source of article : Wikipedia