ArticleslgStudy

computer science

International Obfuscated C Code Contest

International Obfuscated C Code Contest is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand International Obfuscated C Code Contest rather than just read about it. In short: The International Obfuscated C Code Contest (abbreviated IOCCC) is a computer programming contest for code written in C that is the most creatively obfuscated and held annually (when possible). It is described as "celebrating C's syntactical opaqueness".

International Obfuscated C Code Contest — main illustration
International Obfuscated C Code Contest — illustration

Key takeaways

  • International Obfuscated C Code Contest belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect International Obfuscated C Code Contest to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of International Obfuscated C Code Contest from memory before moving on to harder problems.

Reference excerpt

The International Obfuscated C Code Contest (abbreviated IOCCC) is a computer programming contest for code written in C that is the most creatively obfuscated and held annually (when possible). It is described as "celebrating C's syntactical opaqueness". The winning code for the 28th contest, held in 2025/26, was announced by live stream 6 June 2026. Entries are evaluated anonymously by the current sitting judges, Leonid A. Broukhis & Landon Curt Noll. The judging process is documented in the competition FAQ 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 (plus bragging rights). Previous contests were held in the years 1984–1996, 1998, 2000, 2001, 2004–2006, 2011–2015, 2018–2020, and 2024-2025.

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 a 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. Dobb's Journal. In Don Libes' book says:

...they will undoubtedly force you to expand your own mind when you study them. And admittedly, some are just downright insane and only good for laughing at and making fun of.

Rules The Rules vary from year to year and are posted with a set of Guidelines that attempt to convey additional enlightenment about the Rules. They are published on the IOCCC website. In addition all material including winning entries are published under Creative Commons license BY-SA 4.0 International.

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 most significant of the Rules is Rule 2a & 2b (originally Rule 1), gross & net source size limits. During the life time of the contest, Rule 2 has evolved to accommodate subtle increases in source size limits. The 1984 contest started with a maximum source size of 512 bytes, which increased a few more times to 1536 bytes in 1991. In 1992, Rule 2 was split to distinguish between maximum overall size and maximum size ignoring white space and semicolons given certain conditions. In the early days, in order to make best use of space allowed, white space was stripped, often resulting in a compact blob of text, making it hard to read by humans, but served little purpose once passed through a C "pretty print" utility, which the judges did as part of their process. In 1992 the judges believed that form of obfuscation had played out and they wanted to encourage people to explore other ways of formatting the code, such as an ASCII image themed after the entry, or simply more traditionally indented C source. Around 2012/2013 the iocccsize(1) tool was adopted by the contest and tweaked to aid both contestants and judges apply the Rule 2b counting algorithm.

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. 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, 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. During the hiatus between 2020 and 2024 (the Great Fork Merge), many of the winners were updated for modern compilers, for example converting from K&R C to at least C89 syntax, except where doing so would have broken the obfuscation (the original versions are still available for viewing). So with 2024, it should be possible to execute all the entries. The web site documents and invites C programmers to fix those winners still with outstanding issues.

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. Modern compilers, benefiting from lessons learned from contest entries, warn users of problematic source code. You may need to suppress warnings to compile contest entries.

… excerpt ends here. Continue reading the full article.

Illustrations

International Obfuscated C Code Contest illustration
International Obfuscated C Code Contest: Pittsburgh scenery of the Flight simulator
Pittsburgh scenery of the Flight simulator

Worked examples

Example 1 — a first encounter with International Obfuscated C Code Contest

Start with the simplest possible case. Write down what International Obfuscated C Code Contest claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to International Obfuscated C Code Contest before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about International Obfuscated C Code Contest ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of International Obfuscated C Code Contest

In research
International Obfuscated C Code Contest appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses International Obfuscated C Code Contest in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
International Obfuscated C Code Contest is common in secondary-school and first-year university syllabi. It links to neighbouring topics C (programming language) contests, Computer humour, Ironic and humorous awards, so understanding it makes those chapters shorter.
In everyday life
Look for International Obfuscated C Code Contest outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study International Obfuscated C Code Contest in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what International Obfuscated C Code Contest means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain International Obfuscated C Code Contest out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is International Obfuscated C Code Contest in simple terms?

The International Obfuscated C Code Contest (abbreviated IOCCC) is a computer programming contest for code written in C that is the most creatively obfuscated and held annually (when possible). It is described as "celebrating C's syntactical opaqueness".

Why does International Obfuscated C Code Contest matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study International Obfuscated C Code Contest?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on International Obfuscated C Code Contest.

Tags

  • C (programming language) contests
  • Computer humour
  • Ironic and humorous awards
  • Recurring events established in 1984
  • Software obfuscation

Keep exploring