Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] C puzzle
- Date: 03 Aug 2002 10:48:48 +0900
- From: Bruno Raoult <br@example.com>
- Subject: Re: [tlug] C puzzle
- References: <20020726012006.M48242-100000@example.com><15680.11598.642676.889439@example.com> <1027725222.13382.6.camel@example.com><m3d6t6xcn8.wl@example.com> <15685.61809.707516.99320@example.com><3D45F5AD.7030707@example.com> <1028034551.13418.130.camel@example.com><3D4693D2.1020208@example.com> <15686.45289.914784.491660@example.com><20020730154745.GA2854@example.com><1028069808.12070.1.camel@example.com> <15689.53679.467661.271221@example.com>
<crazy_time_before_morning_coffee> In fact, there is a shorter one, if you cheat... A Then you compile with "gcc '-DA=main;' cheat.c" But of course this solution destroys every "programming contest", as it will be the answer for everyone. Shortest DECSS descrambler? A Shortest BrainF*** compiler? A But it permits to write "correct C programs" :-) Shortest crashing program: gcc -DA="main(){main();}" (if this one is the shortest). And the A program is also the answer to any request from your boss: - You want an automatic trading program? We already wrote it. We just need some time to find the correct compiler options... </crazy_time_before_morning_coffee> Sorry for this post, I will feel better after a strong coffee ;-) br. On Fri, 2002-08-02 at 09:26, Viktor Pavlenko wrote: > >>>>> "br" == bruno raoult <br@example.com> writes: > > br> My solution is shorter. And it crashes too :-) > br> main; > > We have had the same contest at a local C/C++ group, I thought you > might enjoy what we generated (programs posted at tlug are included > too). Of course, Bruno is the champion :) > > main(){((void(*)())0)();} > main(){return 1/0;} > main(){*(int*)0=0;} > main(){int i=1/0;} > main(int*i){*i=0;} > main(){main();} > main(i){i/=0;} > main; > > Viktor > > > ************************************************* > TLUG server is hosted by Global Online Japan > http://home.gol.com/index_e.html > ************************************************* > > ================================================= > To unsubscribe from this mailing list, > please see instructions atain(){main();} > http://www.tlug.jp/list.html > ================================================= > -- Comme disait Blaise, si ça fait pas de bien, ça peut pas faire de mal.Attachment: signature.asc
Description: This is a digitally signed message part
- References:
- Re: [tlug] C puzzle
- From: Viktor Pavlenko
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] "Linux Friendly" ADSL Providors
- Next by Date: Re: [tlug] C puzzle
- Previous by thread: Re: [tlug] C puzzle
- Next by thread: Re: [tlug] C puzzle
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links