International Obfuscated C Code Contest: Difference between revisions

Content deleted Content added
No edit summary
Line 61:
Entries often employ strange or unusual tricks, such as using the C preprocessor to do things it was not designed to do (in some cases "spectacularly", according to ''Dr. Dobbs'',<ref>{{cite web |url=https://www.drdobbs.com/open-source/code-finessing/193104882?pgno=2 |title=Code Finessing |magazine=[[Dr. Dobb's Journal]]|author=Spinellis, Diomidis |date=October 5, 2006 |access-date=2023-05-01}}</ref> with one entry creating an 11-bit [[Arithmetic logic unit|ALU]] in the [[C preprocessor]]<ref name="cpp_abuse">[https://www.ioccc.org/2004/vik2.hint IOCCC 2004 – Best Abuse of CPP]'' IOCCC. Retrieved 2023-05-01.</ref>), 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]]. InDuring several of the 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 [[Quine (computing)|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.<ref>{{cite web|year=1994|title=smr.hint|url=https://www.ioccc.org/1994/smr.hint|access-date=2006-09-16|publisher=IOCCC|format=plain text}}</ref>
 
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.