Electronics Circuits & Tutorials - Electronics Hobby Projects - A Complete Electronic Resource Centre
Electronics Circuits & Tutorials

Home About us Electronic Tutorials Engineering Hobby Projects Online Dictionaries Contact us
Tutorials
  • Basic/Beginners
  • Intermediate/Advance
  • Microcontrollers
  • Microprocessors
  • Electronics Symbols
  • Electronics Formulas
  • Dictionary of Units

     more....

Dictionaries
  • Electronics Terms
  • Abbreviations
  • Computer Terms
  • Physics Glossary
  • Science Glossary
  • Space & Solar Terms
  • Semiconductor Symbols / Abbreviation
  • Radio Terminology Bibliography

     more....

Projects
  • Engineering Projects
Home > Electronics Tutorials > Online Computer Terms Dictionary > O

Online Computer Terms Dictionary - O

Obfuscated C Contest

<programming> The International Obfuscated C Code Contest (IOCCC) is an annual contest run since 1984 over Usenet by Landon Curt Noll and friends. The overall winner is whoever produces the most unreadable, creative, and bizarre (but working) C program. Various other prizes are awarded at the judges' whim. C's terse syntax and macro-preprocessor facilities give contestants a lot of maneuvering room. The winning programs often manage to be simultaneously funny, breathtaking works of art and horrible examples of how *not* to code in C.

This relatively short and sweet entry might help convey the flavour of obfuscated C:

 /*
 * HELLO WORLD program
 * by Jack Applin and Robert Heckendorn, 1985
 */
 main(v,c)char**c;{for(v[c++]="Hello, world!\n)";
 (!!c)[*c]&&(v--||--c&&execlp(*c,*c,c[!!c]+!!c,!c));
 **c=!c)write(!!*c,*c,!!**c);}

Here's another good one:

 /*
 * Program to compute an approximation of pi
 *  by Brian Westley, 1988
 */

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

Note that this program works by computing its own area. For more digits, write a bigger program. See also hello, world.

[Jargon File]

 


Nearby terms: Oberon-2 « Oberon-V « OBEX « Obfuscated C Contest » obi-wan error » OBJ » OBJ0
 

Discover
  • C/C++ Language Programming Library
  • Electronic Conversions
  • History of Electronics
  • History of Computers
  • Elec. Power Standards
  • Online Calculator and Conversions
  • Electrical Hazards - Health & Safety
  • Datasheets
  • Quick Reference links
  • Electronics Magazines
  • Career in Electronics
  • EMS Post Tracking

     more......

Home Electronic Tutorials Engineering Hobby Projects Resources Links Sitemap Disclaimer/T&C

Copyright © 1999-2020 www.hobbyprojects.com  (All rights reserved)