home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:12511 comp.programming:2378
- Path: sparky!uunet!mcsun!Germany.EU.net!unido!open.de!mailbox!teddy!germany!open!ruhr.de!horga!erni.bs.open.de!germal!germal.bs.open.de!gm
- From: gm@germal.bs.open.de (Gerald Malitz)
- Newsgroups: comp.lang.c,comp.programming
- Subject: Re: A LITTLE BRAINTEASER...
- Message-ID: <UuUwr*iT1@germal.bs.open.de>
- Date: 17 Aug 92 13:33:12 GMT
- References: <aet.713608023@munagin> <Bswt31.7zC@research.canon.oz.au> <josef.713800013@uranium>
- Lines: 24
- X-Newsreader: Arn V1.00 beta rel2
-
- In article <josef.713800013@uranium>, Josef Moellers writes:
-
- > In <Bswt31.7zC@research.canon.oz.au> andy@research.canon.oz.au (Andy Newman) writes:
- >
- > >aet@mullian.ee.mu.OZ.AU (bert thompson) writes:
- [...]
- > >> char ch = getchar();
- > > ^^^^^^^
- > > NOT AGAIN!
- [...]
- > >So how may machines does this work on? Want to run it on something
- > >without memory protection and let the little sucker recurse and
- > >recurse...
- >
- > It'll run perfectly on systems that have signed characters!
-
- No, it won't.
-
- > EOF usually is -1, so '\377' will expand to -1.
-
- '\377' may appear at any place within a file. So (ch == EOF)
- may be TRUE long before you reach EndOfFile.
-
- regards, Gerald.
-