Fact-checked by Grok 2 weeks ago

International Obfuscated C Code Contest

The International Obfuscated C Code Contest (IOCCC) is an annual programming competition that challenges participants to create the most creatively obfuscated yet functional C programs, emphasizing deliberate complexity and clever tricks within strict guidelines to highlight the pitfalls of poor coding practices. Originating on March 23, 1984, when Landon Curt Noll and Larry Bassel announced it on USENET groups net.lang.c and net.unix-wizards while working at National Semiconductor's Genix porting group, the contest was inspired by frustration with substandard code and the Bulwer-Lytton Fiction Contest's satirical approach to writing. Its primary goals include writing the most obscure C programs under the rules, ironically demonstrating the value of clear programming style through negative examples, testing C compilers with unusual constructs, illustrating language subtleties, providing a safe outlet for experimental code, and fostering fun with C programming. Key rules require entries to be original C source code no larger than 4993 bytes (or 2503 bytes after processing with the official iocccsize tool), submitted as an xz-compressed tarball including a prog.c file, a non-empty Makefile, and a remarks.md file explaining the program's purpose and obfuscation techniques in Markdown format. Programs must compile without human interaction using standard tools, avoid special privileges like setuid unless documented, contain no author identifiers in code or output, and discourage direct copies of past winners; up to 10 submissions per entrant are allowed during open periods, with judging prioritizing creativity, obfuscation quality, and justified rule usage. Winners, selected by a panel of judges, receive humorous category awards such as "Worst Abuse of the " or "Most Erratic Behavior," and their entries—now in the —are archived on the official website with detailed explanations, serving as educational resources despite disclaimers against using the code in production environments. The contest has run continuously since its inception, reaching its 28th edition in 2025, and maintains an ad-free online presence with tools like mkiocccentry for submissions, alongside community engagement on platforms like and .

History

Origins and Founders

The International Obfuscated C Code Contest (IOCCC) was founded on March 23, 1984, by Curt Noll, then 23 years old, and Bassel while they were employed at Semiconductor's Genix porting group. At the time, the duo was tasked with debugging various UNIX utilities for Semiconductor's Genix operating system, including the (by Bassel) and the finger command and its daemon (by Noll), which exposed them to numerous examples of poorly written code. The idea for the contest emerged from a conversation between Noll and Bassel about the challenges of maintaining code quality amid such substandard examples. Frustrated by the depressing nature of their debugging work, they decided to create a contest that would ironically celebrate the "worst" C code possible, drawing inspiration from the for bad writing. This approach aimed to highlight the pitfalls of obfuscation through satire, much like exposing literary vices. The initial goals of the IOCCC were multifaceted: to showcase obfuscated C code as a negative example to emphasize the importance of clear ; to demonstrate the robustness of C compilers by pushing them with unusual constructs; to illustrate subtleties and edge cases in the C language; to provide a humorous outlet for intentionally poor code; and ultimately to promote enjoyment and appreciation of C programming despite its quirks. As Noll later reflected, the contest sought to "instill disgust for poor coding style" and reveal how unstructured code diminishes program utility. The first contest was held in 1984, with submissions limited to complete C programs of 512 bytes or fewer, judged primarily on creativity and obscurity. It was announced via USENET groups such as net.lang.c and net.unix-wizards, marking an early use of networked communication for programming challenges. Early winners included programs such as one that moved a smiley face across the screen and another that printed spiraling numbers, setting the tone for the contest's blend of technical ingenuity and whimsy.

Evolution and Recent Developments

The International Obfuscated C Code Contest (IOCCC) began as an annual event in 1984 and continued largely uninterrupted through 1999, hosting contests each year with the exception of occasional gaps, such as the absence of a 1997 edition due to organizational constraints. This period established the contest's reputation for celebrating creative yet bewildering C programming, drawing submissions from around the world via early internet forums like Usenet. By the late 1990s, the event had solidified its niche, but participation fluctuations and logistical issues led to the first significant hiatuses, including skips in 2002–2003 and a longer break from 2007 to 2010 following the 2006 contest, attributed to judging overload and evolving internet dynamics. Subsequent revivals marked key turning points, with the contest resuming in 2011 after a five-year pause and reaching its 25th edition in 2018, highlighting its resilience amid sporadic interruptions like the 2016–2017 gap. A major four-year hiatus from 2021 to 2024 ensued, driven by judging challenges and global events including the , which disrupted coordination among the volunteer panel. The 28th edition (2024) broke this silence, culminating in a record 23 winning entries announced on August 3, 2025, via a live stream that sparked discussions on the role of AI-generated code in practices. This edition underscored the contest's adaptation to contemporary tools, including the launch of a server in the early for real-time community engagement, a account (@[email protected]) for official updates, and a in 2019 to archive and share winning entries publicly. Registration for the 29th edition (IOCCC29) is scheduled to begin in December 2025. The IOCCC's enduring legacy positions it as the longest-running online programming contest, influencing prominent figures in computing such as , the creator of , who secured victories in 1986 and 1987 for entries renowned for their clever misuse of directives and humorous obfuscation. These developments reflect the contest's evolution from a Usenet-era curiosity to a vibrant, digitally connected tradition that continues to inspire innovation in code artistry despite intermittent pauses.

Rules

Program Requirements

The International Obfuscated C Code Contest imposes strict technical specifications on submitted programs to ensure they are valid, portable C code while allowing creative obfuscation within defined bounds. These requirements emphasize standard compliance, originality, and self-containment, preventing entries from relying on non-standard features or external dependencies that could hinder judging or demonstration. Submissions must consist of standard C programs, excluding C++ or other languages, and compile without undefined behavior using common compilers such as GCC or Clang under the -std=gnu17 -O3 flags by default. The main source file, named prog.c, must not exceed 4993 bytes in size, while its effective size—calculated after preprocessor expansions via the iocccsize tool—must be at most 2503 characters to discourage evasion tactics like excessive macros. Additionally, the entire submission tarball is limited to 3999971 bytes, with the untarred contents not surpassing 27651 × bytes, ensuring manageability for judges. Content rules mandate that programs be original works or include documented permissions for any borrowed elements in the remarks.md file; no author identifiers, such as names or emails, may appear in the code, data, output, or remarks to maintain anonymity during judging. Entries must compile and execute without human intervention, special privileges (e.g., root access, unless creatively justified and explained), or modifications to files outside the current directory—except for temporary use of /tmp or /var/tmp, which must be cleaned up via a clobber target in the Makefile. Creative "rule abuse" is permitted if it enhances obfuscation and is thoroughly documented, but programs must run portably across UNIX-like systems without IDE dependencies or hidden files like .git. Required files include prog.c as the , a GNU-format Makefile that builds an named prog using variables like ${CC} and ${CPP} while including a clobber to restore the environment, and a non-empty remarks.md file in format explaining the program's functionality, rationale, any bugs or limitations, tool usage (e.g., generators), and build/run instructions. Up to 31 additional files are allowed (e.g., alternate sources like prog.alt.c or test scripts like try.sh), bringing the total to a maximum of 39 files including generated metadata like .info.json and .auth.json. No trailing carriage returns (control-M characters) are permitted in files, and prog.c may optionally end without a . All winning entries are licensed under Attribution-ShareAlike 4.0 International (CC BY-SA 4.0), allowing broad reuse while requiring attribution and share-alike terms.

Submission and Judging Process

To participate in the International Obfuscated C Code Contest (IOCCC), entrants must first register on the official website during the pending or open phases of the contest cycle. Registration requires providing a valid , after which a unique username and password are emailed to the registrant, typically within a few days. This process generates a UUID for the entrant, enabling secure submissions. For the 28th edition, the contest period ran from December 29, 2024, to June 5, 2025, with a pending phase allowing rules review and an open submission window from March 5, 2025, to June 5, 2025. Submissions are limited to a maximum of 10 entries per person per contest and must be prepared using the official mkiocccentry tool, available from the IOCCC GitHub repository, to create an xz-compressed tarball not exceeding 3,999,971 bytes. Each entry must include a mandatory prog.c file (limited to 4,993 bytes, emphasizing originality and obfuscation), a Makefile, and a non-empty remarks.md file in Markdown format explaining the program's functionality, obfuscation rationale, any bugs or limitations, tool usage, and build/run instructions. Up to 31 additional files are permitted for data or supporting elements. Entrants upload the tarball via a web form on the submit server (submit.ioccc.org) exclusively during the open period, with the tool ensuring compliance with formatting and size requirements prior to submission. The judging process is managed by a panel consisting of Leonid A. Broukhis and Curt Noll, who evaluate entries anonymously by assigning them random identifiers. Criteria focus on the quality of , creativity, functionality, and adherence to contest rules, including compilability on specified systems without external dependencies beyond standard libraries. Entries undergo elimination rounds: judges read the source and remarks, preprocess and beautify the code, compile and test it, and iteratively narrow down submissions through multiple review sessions over weeks. Rejects occur for violations such as , non-compilable code, or failure to meet standards; no feedback or total submission counts are provided for non-winners. Advancing entries, typically reduced to around 25, are then categorized based on standout qualities, such as "Best one-liner," "Most cacophonic," or "Prize in pentagrammatology," with a "Best of Show" often awarded to the most exceptional. For the 28th edition, winners were announced on August 2, 2025. Winners are announced on the official IOCCC website (ioccc.org) after the contest closes, with updates also shared via Mastodon (@[email protected]) and a GitHub repository containing the winning entries. Selected programs may receive minor modifications, such as renaming remarks.md to README.md, for public display under a Creative Commons BY-SA 4.0 license. Non-winning entrants are encouraged to refine their code and resubmit in future contests, though no official revisions or downloads of rejected entries are supported.

Obfuscation Techniques

Employed Strategies

Participants in the International Obfuscated C Code Contest employ a variety of techniques to render their C programs intentionally difficult to understand while ensuring functionality and compliance with standard C compilers. These strategies leverage the quirks and flexibilities of the C language to obscure intent, often combining multiple methods for compounded effect. abuse is a cornerstone of in the contest, where entrants extensively use #define directives to redefine keywords, operators, and standard functions, creating dense, macro-expanded expressions that generate at compile-time. For instance, macros can simulate self-reproducing quines through looped definitions or transform simple statements into labyrinthine constructs, making the source code appear nonsensical until preprocessed. This approach exploits the 's text capabilities to hide algorithmic logic behind layers of . Pointer and array manipulations further enhance obscurity by employing intricate pointer arithmetic to traverse data structures in non-intuitive ways, such as treating multi-dimensional arrays as one-dimensional buffers or using unions to overlay disparate data types, thereby concealing the true nature of variables and operations. These tricks rely on C's loose typing and memory model to alias memory regions unexpectedly, forcing readers to mentally reconstruct access patterns. Control flow obfuscation involves crafting convoluted paths through the program using nested loops and conditionals without braces to create ambiguous scoping, strategic placements of goto statements to form irregular jumps, or recursive functions that emulate iterative processes in disguise. Such methods disrupt linear reading, embedding the actual execution sequence within a maze of redundant or misleading branches. For output and input/output handling, contestants obscure I/O by leveraging side effects in expressions, such as the within printf calls to interleave computations with printing, encoding textual strings as numeric constants or bitwise manipulations, and incorporating in comments that subtly affect tokenization or parsing. These techniques disguise data emission and reception, often making the program's visible behavior emerge only after careful tracing. Humorous elements are integral to many submissions, where programs execute unexpectedly complex tasks—like simulations or games—while masquerading as trivial routines, with ironic explanations in accompanying remarks files that reveal the only after unraveling the code. This blend of and technical prowess aligns with the contest's ironic emphasis on , rewarding entries that amuse as much as they confound.

Common Pitfalls and Prohibitions

Submissions to the International Obfuscated C Code Contest (IOCCC) must adhere strictly to the contest rules to avoid disqualification, with judges emphasizing portability and standard compliance to ensure entries function reliably across (SUS) environments. Reliance on , such as signed or violations of sequence point rules, is discouraged because it can lead to unpredictable results on different compilers or systems, undermining the contest's portability requirements. For instance, code exploiting implementation-defined behaviors like specific hardware assumptions may fail to compile or run consistently, resulting in rejection during judging. Exceeding size limits after preprocessing is a common pitfall, as the prog.c file must not surpass 4993 bytes in raw form and 2503 bytes when measured by the iocccsize tool, which accounts for expanded macros and includes. Early contests highlighted abuses like excessive comments or directives that inflated file size without enhancing , such as simple overreliance on /lib/, which was discouraged unless unusually creative. Judges detect such attempts by preprocessing submissions, leading to disqualification if they appear as rule circumvention. Plagiarism and lack of often result in rejection, as Rule 7 requires entries to be the submitter's original work or to include documented permission from owners; copying elements from past winners without significant innovation is particularly scrutinized, with similarities to prior self-reproducing programs making approval harder. Trivial or non-original submissions, like empty files, have been awarded "worst abuse of " in the past—for example, the entry that output its own (empty) listing as a self-reproducer—but such approaches are now strongly discouraged and risk immediate disqualification for failing to demonstrate . Judging places heavy emphasis on to maintain the contest's spirit. Runtime issues frequently cause disqualifications, including programs that require user input beyond command-line flags, network access, or file creation in unauthorized directories outside the current (except /tmp or /var/tmp). Entries needing special privileges, such as or access, must be fully documented but are highly discouraged, as they violate the no-human-intervention rule for building and running. Undocumented dependencies on non-standard environments exacerbate these problems, preventing clean execution in the required SUS setup. In modern contests, AI-generated submissions are permitted if the submitter remains the ultimate author and details tool usage in remarks.md, but they face heightened scrutiny for lacking human creativity, potentially leading to lower rankings or rejection if deemed insufficiently original. Technical pitfalls like trailing control characters (e.g., carriage returns) or non-compliant remarks (e.g., invalid in remarks.md) can cause failures or validation errors, resulting in outright rejection during the submission process.

Notable Winning Entries

Classic Examples

One of the most iconic early entries in the International Obfuscated C Code Contest (IOCCC) is Brian Westley's Best Layout winner, which approximates π by treating the program's as a and calculating its enclosed area. The code prints its own source in a circular pattern using underscores and hyphens, then uses the formula 4 × (area / ) to derive an approximate value of 3.14159, leveraging the and tricks to obscure the computation. This entry exemplifies foundational through and visual trickery, demonstrating how can contribute to both functionality and confusion. In , John Tromp's Best Game entry implemented a compact version of , known as "squished ," using sequences for and to handle piece rotations and line clears within a highly condensed structure. The program fits the entire game logic, including and scoring, into under 1KB by abusing pointer arithmetic and inline assembly-like constructs, highlighting early efforts to embed complex in minimal, unreadable code. This winner showcased the contest's potential for practical applications disguised as nonsense. The Best of Show by Vern Paxson introduced one of the contest's earliest chess engines, where the program plays black against the user entering moves in algebraic notation. Obfuscated via runtime computation of board constants, function pointers for the board representation, and brute-force alpha-beta search limited to 4 plies, the entry avoids standard arrays and uses probabilistic evaluation for piece values, resulting in a functional but quirky player that ignores and some rules. At 2 plies, it responds in about 1.8 seconds on period , illustrating pioneering of strategic games through deceptive variable naming and . A standout 1998 Best of Show entry by simulated a 3D flight for a Piper Cherokee aircraft, incorporating 6-degree-of-freedom physics, wireframe scenery rendering in ASCII, and a heads-up display for instruments using integer approximations of and rotated coordinate systems. The 1536-byte program loads scenery files for horizons or cities like , controlled via for pitch/roll and page keys for throttle, obfuscated through macro-defined key mappings and packed floating-point alternatives in integers. This entry demonstrated advanced simulation creativity, pushing C's limits for real-time graphics without libraries beyond X11. Early quine examples, such as those from and , often abused string manipulation and inclusion to self-reproduce, with the 1984 Dishonorable Mention anonymous entry using minimal to output a "hello, world!" variant that borders on self-description, while later ones like 1988's self-including primes printer by Applin created infinite loops of source replication via recursive defines. These self-reproducing programs, awarded for "worst abuse," emphasized the contest's humor in exploiting C's self-referential capabilities, like catenating as without explicit strings.

Contemporary Winners

The International Obfuscated C Code Contest entered its contemporary phase in the 2000s, with entries increasingly incorporating advanced computational techniques and visual deception to push the boundaries of C's expressiveness. A standout example is the ray tracer by Anders Gavare, awarded "Best use of light and spheres." This program renders scenes using ray tracing algorithms in highly compact code, obfuscated through the avoidance of reserved words (except "main") and preprocessor directives, as well as implicit variable declarations that trigger warnings but compile successfully; the technique creates a deceptive simplicity, masking the sophisticated visual output of spheres and lighting effects. The 2020 contest continued the resurgence with multiple winners emphasizing interpreters and visualizers amid post-2010 innovations. Bob Burton's Best of Show entry implements an interpreter for , a custom minimalist language, obfuscated to hide its Turing-complete functionality within dense, non-obvious loops. Similarly, Andrew Carlini's chaotic attractor visualizer renders intricate zooms, awarded for its ability to confuse, using mathematical iterations disguised as simple integer operations to produce mesmerizing, dynamic graphics that highlight the era's focus on computational artistry. The 28th contest in 2025 represented a major revival after extended hiatuses, announcing a record 23 winners due to submission backlogs from pandemic disruptions and the proliferation of AI tools in programming. Highlights include a console-based moon phase drawer that computes and renders phases using precise time calculations for daily updates, obfuscated via bit manipulations and conditional ASCII outputs. Another key entry is an interpreter for Obfuscated Fun Language (OFL), designed to minimize the "cost" of #define directives by optimizing macro expansions for efficiency in a functional-style subset of C, demonstrating innovative language embedding. Judges' discussions underscored AI's capability to generate boilerplate code but its limitations in creating truly novel obfuscation, preserving human creativity as central to the contest. Contemporary trends reflect C's adaptation to modern contexts, with a shift toward outputs such as cacophonic audio generation through manipulations that produce discordant sounds mimicking instruments or art. Entries have also trended toward web compatibility, compiling to for browser execution without traditional dependencies. Since 2019, the mkiocccentry tool has influenced submissions by automating size checks, rule validation, and formatting, enabling entrants to focus on creativity while ensuring compliance.

References

  1. [1]
    The International Obfuscated C Code Contest
    Goals of the Contest · To write the most Obscure/Obfuscated C program within the rules. · To show the importance of programming style, in an ironic way. · To ...Entries · Winning authors · Status · FAQ
  2. [2]
    The International Obfuscated C Code Contest
    The official IOCCC website is www.ioccc.org. How it was started: It was a ... International Obfuscated C Code Contest (IOCCC), the Internet's oldest ongoing ...
  3. [3]
    The International Obfuscated C Code Contest
    ### Summary of Key Rules and Guidelines for the International Obfuscated C Code Contest
  4. [4]
    News - The International Obfuscated C Code Contest
    The 40th Anniversary International Obfuscated C Code Contest has been released, and we are delighted to share the winning entries from IOCCC28! The source code ...
  5. [5]
    The 'Obfuscated C Code' Competition Returns - The New Stack
    Jan 10, 2025 · The contest began on March 23, 1984, when a 23-year-old Landon Curt Noll was working with Larry Bassel at the National Semiconductor, porting ...Missing: origins | Show results with:origins
  6. [6]
  7. [7]
    IOCCC Winning Entries by Year
    Download all IOCCC winning entries of 2020. Jump to: top 2019 - The 26th IOCCC About the 26th IOCCC (2019) Download all IOCCC winning entries of 2019.2020/burton · 2020/carlini · 2020/endoh1 · 2020/yang
  8. [8]
    A Tradition Continues: the International Obfuscated C Code Contest
    Apr 15, 2018 · One of the contests first winners was Larry Wall, who followed his back-to-back victories in 1986 and 1987 by writing his own programming ...
  9. [9]
    2018 - The 25th IOCCC
    The IOCCC is a contest where participants try to figure out how the winning code works. The 2018 contest had entries like 'Best of Show' and 'Most likely to ...
  10. [10]
    The 'Obfuscated C Code Contest' Confronts the Age of AI
    Aug 17, 2025 · In his 40th year of judging IOCCC entries, Noll shared his testimony to human programmers. “The people that wrote these programs put a lot of ...
  11. [11]
    Winners Announced in 2025's 'International Obfuscated C Code ...
    Aug 3, 2025 · Started in 1984, it's been described as the internet's longest-running contest. And yesterday 2025's International Obfuscated C Code Contest ...Missing: quine | Show results with:quine
  12. [12]
    IOCCC social media - The International Obfuscated C Code Contest
    IOCCC Social Media. Please join the IOCCC Discord Server: https://discord.gg/Wa42Qujwnw · Discord logo. Follow the IOCCC on Mastodon: ... GitHub logo. Copyright ...Missing: modern adaptations
  13. [13]
    Winners of the International Obfuscated C Code Contest - GitHub
    GitHub repository are the official entries that won the International Obfuscated C Code Contest (IOCCC), the Internet's oldest ongoing contest.
  14. [14]
    1986/wall - Grand Prize - Most well rounded in confusion
    This program is a masterpiece of obfuscation and humor. Larry Wall (the hacker who gave us rn and patch, etc.) asks you to compile and consider the warning ...Missing: cultural impact longest-
  15. [15]
    1987/wall - Most useful obfuscation
    1987 IOCCC entry wall - Most useful obfuscation.Missing: cultural impact longest-
  16. [16]
    IOCCC guidelines
    This file contains guidelines intended to help people who wish to participate in the International Obfuscated C Code Contest (IOCCC).
  17. [17]
    IOCCC FAQ Table of Contents
    Q 2.8: Why do some IOCCC entries receive the Grand Prize or Best of Show award? Q 2.9: How are winning IOCCC entries announced? Q 2.10: Why don't you publish ...Missing: quine | Show results with:quine
  18. [18]
  19. [19]
    The International Obfuscated C Code Contest
    ### Summary of IOCCC Judges Information
  20. [20]
    [PDF] A Box, Darkly: Obfuscation, Weird Languages, and Code Aesthetics
    An anonymous entry to the 1984 International Obfuscated C Code Contest that prints “hello, world! ... A common, high-level obfuscation technique that is ...
  21. [21]
    [PDF] Obfuscation
    The art of writing “unintelligible” code, while preserving functionality. Page 5. Obfuscation is Fun. International Obfuscated C Code Contest (IOCCC). Page 6 ...
  22. [22]
    1987 - The 4th IOCCC - The International Obfuscated C Code Contest
    Hints for what to do and not to do were also given in the rules. For example, a simple excessive abuse of /lib/cpp was discouraged unless the abuse was unusual.Missing: early | Show results with:early
  23. [23]
    1994/smr - Worst abuse of the rules
    The 1994/smr entry was the world's smallest self-reproducing program, not a valid C program, but not invalid, and produces a listing of itself on stdout.
  24. [24]
    1988/westley - Best layout
    ### Summary of How It Computes Pi and Obfuscation (1988/westley)
  25. [25]
    1989/tromp - Best game
    The International Obfuscated C Code Contest. 1989/tromp - Best game. squished tetris. ← 1989/roemer ↑ 1989 ↑ 1989/vanb → C code Makefile Inventory ...
  26. [26]
    1992/vern - Best of Show
    ### Entry Description
  27. [27]
    1998/banks - Best of Show
    ### Summary of 1998/banks - Best of Show
  28. [28]
    1984/anonymous - The International Obfuscated C Code Contest
    It is the first entry to become a tattoo isn't it? Landon Curt Noll, the one who told the author about the tattoo, wrote back: Yes, to our knowledge it is.
  29. [29]
    2004/gavare - Best use of light and spheres
    The International Obfuscated C Code Contest. 2004/gavare - Best use of light and spheres. A ray tracer. ← 2004/burley ↑ 2004 ↑ 2004/gavin ...
  30. [30]
    Twenty Eighth International Obfuscated C Code Contest
    Aug 3, 2025 · For an obfuscation comp, I love the fact they explicitly refer to and do not rewrite "index.html web pages for each winning entry".<|control11|><|separator|>