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: Tue, 30 Jul 2002 11:29:45 -0400
- From: Viktor Pavlenko <vvp@example.com>
- Subject: Re: [tlug] C puzzle
- References: <20020726012006.M48242-100000@example.com><15680.11598.642676.889439@ shmyh.ua><1027725222.13382.6.camel@example.com><m3d6t6xcn8.wl@example.com co.jp><15685.61809.707516.99320@example.com><3D45F5AD.7030707@example.com><1028034551.13418.130.camel@example.com><3D4693D2.1020208@example.com>
>>>>> "JG" == Josh Glover <jmglov@example.com> writes: JG> bruno raoult wrote: >> >> PS. BTW, what is this "smallest C program", which compiles with >> no options? JG> The canonical answer is: JG> main(){} What about the one which always crashes? The following program contains 25 characters, uses no library functions and segfaults when run: main(){((void(*)())0)();} I used the following line to test the code (may save you some typing): $ echo 'main(){((void(*)())0)();}' > f.c; gcc -o f f.c; ./f; rm f.c f Segmentation fault Viktor
- Follow-Ups:
- Re: [tlug] C puzzle
- From: David Santinoli
- Re: [tlug] C puzzle
- From: Josh Glover
- References:
- [tlug] C puzzle
- From: Tod McQuillin
- Re: [tlug] C puzzle
- From: bruno raoult
- Re: [tlug] C puzzle
- From: Viktor Pavlenko
- Re: [tlug] C puzzle
- From: Josh Glover
- Re: [tlug] C puzzle
- From: bruno raoult
- Re: [tlug] C puzzle
- From: Josh Glover
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] C puzzle
- 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