Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site pluto.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!pyramid!pesnta!phri!pluto!warren From: warren@pluto.UUCP (Warren Burstein) Newsgroups: net.lang.c Subject: Re: Disgusting Code Message-ID: <345@pluto.UUCP> Date: Thu, 13-Feb-86 12:51:06 EST Article-I.D.: pluto.345 Posted: Thu Feb 13 12:51:06 1986 Date-Received: Sun, 16-Feb-86 04:34:33 EST References: <168@pyuxv.UUCP> <167@butler.UUCP> <344@pluto.UUCP> Organization: The Mayhem Institute Lines: 37 > A trade (Info-world? DecWorld?, DecProfessional?) published the > results of the second annual "Obfuscated C-Code Contest"a couple of > months ago. > > At one time I had a copy of the article, and the first, second, > third and honorably mentioned entries. They were pretty disgusting. > > I can't seem to find my copy of the article, but posting the results > would stimulate the creative flow of juices in us all. > Here are two of them. First and second prize aren't online since one only runs on a VAX (went something like unsigned in main[] = {...}) and another didn't really do anything. I found them in Micro/Systems Journal. third place: a[900]; b;c;d=1 ;e=1;f; g;h;O; main(k, l)char* *l;{g= atoi(* ++l); for(k= 0;k*k< g;b=k ++1) ;for(h= 0;h*h<= g;++h); --h;c=( (h+=gh *(h+1)) -1)1; while(d <=g){ ++O;for (f=0;f< O&&d<=g ;++f)a[ b<<5|c] =d++,b+ =e;for( f=0;f