home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!mcsun!fuug!ositech.fi!gml
- From: gml@ositech.fi (Mikael Lonnroth)
- Subject: Re: Question about code in Kernighan and Ritchie book
- Message-ID: <gml.26.0@ositech.fi>
- Lines: 20
- Sender: usenet@fuug.fi (USENET News System)
- Nntp-Posting-Host: ositech.fi
- Organization: Ositech Oy
- References: <66653@hydra.gatech.EDU>
- Date: Mon, 24 Aug 1992 00:40:55 GMT
-
- In article <66653@hydra.gatech.EDU> gt5870c@prism.gatech.EDU (Noah White) writes:
-
- >do not appear to work, when I run them it takes in the input fine but doesn't
- >print anything out. As I am new to c I thought one of you net guru's could
- >help me out:
- .
- .
- .
- > while ((c = getchar()) != EOF) {
- .
- .
- .
- > printf("%d %d %d\n", nl, nw, nc);
-
- The program does not exit from the while loop before you type an EOF on
- your keyboard (MSDOS ^Z, UNIX ^D). Maybe that is the problem?
- --
- gml@ositech.fi
- Georg M. Lönnroth
- Espoo, Finland
-