Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ucbvax!ulysses!ggs
From: ggs@ulysses.homer.nj.att.com (Griff Smith)
Newsgroups: comp.lang.c
Subject: Re: ugly code
Summary: how soon they forget...
Message-ID: <3267@ulysses.homer.nj.att.com>
Date: 11 Dec 87 14:54:26 GMT
References: <1311@lll-lcc.aRpA> <212@ntcsd1.UUCP>
Distribution: na
Organization: AT&T Bell Laboratories, Murray Hill
Lines: 25

In article <212@ntcsd1.UUCP>, stephenk@ntcsd1.UUCP writes:
> ... the following example of ugly code was presented for the final exam of
> a 'C' language course I just completed at North Carolina State University:
> 
> main(){printf(&unix["\021%six\010\0"],(unix)["have"]+"fun"-0x60)}
> 
> I'm pretty sure that the above is correct but I'm doing it from memory
> so take that for what it's worth.

Close.  It's

main() { printf(&unix["\021%six\012\0"],(unix)["have"]+"fun"-0x60);}

It was written by Dave Korn as an entry in the 1987 International
Obfuscated C Code Contest.  It took the prize as "best one liner".

| Stephen Keilholz
| (New user of the network)

OK, we'll forgive you.  Tell your instructor to credit the author next time.
-- 
Griff Smith	AT&T (Bell Laboratories), Murray Hill
Phone:		1-201-582-7736
UUCP:		{allegra|ihnp4}!ulysses!ggs
Internet:	ggs@ulysses.uucp