FACTOID # 106: Americans are 15% more innovative than the Japanese. But in percentage terms, the Japanese grant 3.5 times more patents.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > International Obfuscated C Code Contest

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, 2003, and 2006).[1] There are many winning entries each year, and each entry gets a category like "Worst Abuse of the C preprocessor" or "Most Erratic Behavior". Computer programming (often simply programming) is the craft of implementing one or more interrelated abstract algorithms using a particular programming language to produce a concrete computer program. ... Obfuscate redirects here; for the Discipline from the Vampire: The Masquerade/World of Darkness fictional setting please see Discipline (World of Darkness)#Obfuscate. ... C is a general-purpose, block structured, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. ... In communications, a code is a rule for converting a piece of information (for example, a letter, word, or phrase) into another form or representation, not necessarily of the same type. ... The C preprocessor (cpp) is the preprocessor for the C programming language. ...


The entry deadline for the 2007 contest was February 28, 2007. February 28 is the 59th day of the year in the Gregorian calendar. ... Year 2007 (MMVII) is the current year, a common year starting on Monday of the Gregorian calendar and the AD/CE era. ...


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 complicated things — a 2004 winner turned out an operating system [2]. Landon Curt Noll is the discoverer of two Mersenne primes. ...


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". [3]
  • 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.[4]
  • Why not use the program to hide another program in the program? It must have seemed reasonable at the time.[5]
  • The program implements an 11-bit ALU in the C preprocessor. [6]
  • I found that calculating prime numbers up to 1024 makes the program include itself over 6.8 million times.[6]

Below is a 1988 entry which calculates pi by looking at its own area: [7] The arithmetic logic unit/arithmetic-logic unit (ALU) of a computers CPU is a part of the execution unit, a core component of all CPUs. ... The C preprocessor (cpp) is the preprocessor for the C programming language. ... When a circles diameter is 1, its circumference is π. The mathematical constant π is an irrational real number, approximately equal to 3. ... Area is a physical quantity expressing the size of a part of a surface. ...

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

(Note that the entry was written in K&R C; it doesn't work correctly in ANSI C without some change[8].)


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).[9]

The nature of this contest has naturally resulted in 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 even cause crashes. In computer science, self-modifying code is code that alters its own instructions, whether or not it is on purpose, while it is executing. ... In computing, a quine is a program (a form of metaprogram) that produces its complete source code as its only output. ... make is a computer program that automates the compilation of programs whose files are dependent on each other. ...


See also

The Obfuscated Perl contest is a competition for programmers of Perl which has been held annually since 1996. ... The Underhanded C contest is a programming contest to turn out code that is malicious, but passes a rigorous inspection, and looks like an honest mistake. ...

References

  1. ^ International Obfuscated C Code Contest years page
  2. ^ gavin.hint (plain text). IOCCC (2004). Retrieved on 2007-03-13.
  3. ^ IOCCC 2004 - Best Calculated Risk
  4. ^ IOCCC 2004 - Best abuse of the Periodic table
  5. ^ IOCCC 2004 - Best abuse of Indentation
  6. ^ a b IOCCC 2004 - Best Abuse of CPP
  7. ^ 5th International Obfuscated C Code Contest, 1988 - westley.c
  8. ^ using gcc, compile with the following command line: gcc -E r.c | sed 's/- -/--/g' > r2.c ; gcc -o r2 r2.c (The source file is r.c)
  9. ^ smr.hint (plain text). IOCCC (1994). Retrieved on 2006-09-16.

Year 2007 (MMVII) is the current year, a common year starting on Monday of the Gregorian calendar and the AD/CE era. ... is the 72nd day of the year (73rd in leap years) in the Gregorian calendar. ... Year 2006 (MMVI) was a common year starting on Sunday (link displays full 2006 calendar) of the Gregorian calendar. ... // 1400 - Owain Glyndŵr declared Prince of Wales by his followers. ...

External links


  Results from FactBites:
 
Obfuscated code - Wikipedia, the free encyclopedia (1363 words)
One definition of "code obfuscation" is a set of transformations on a program, that preserve the same fl box specification while making the internals difficult to reverse-engineer.
Obfuscation serves to increase the difficulty of decompilation, usually forcing someone who wants that information to use more costly forms of reverse engineering.
Source code obfuscators are often buggy because most are built using simple-string munging tools that fail to account for all the complexities of the source language syntax.
C programming language - Wikipedia, the free encyclopedia (6413 words)
C is distinguished for the efficiency of the code it produces, and is the most commonly used programming language for writing system software, though it is also widely used for writing applications.
As a result, it is possible to write C code at a low level of abstraction analogous to assembly language; in fact C is sometimes referred to (and not always pejoratively) as "high-level assembly" or "portable assembly." It is also sometimes referred to as a mid-level language.
C is used as an intermediate language by some high-level languages (Eiffel, Sather, Esterel) which do not output object or machine code, but output C source code only, which is then input to a C compiler, which then outputs finished object or machine code.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.