Re: HELP!! Two questions from <<the c programming language>>
- From: Keith Thompson <kst-u@xxxxxxx>
- Date: Thu, 31 May 2007 02:18:26 -0700
Ian Collins <ian-news@xxxxxxxxxxx> writes:
Tak wrote:[...]
[snip]{
char c;
while ((c = getchar()) != EOF)
I don't know whether it's right or not?It looks OK, but have you tried it? It should be easy enough to test.
What type does getchar() return?
See also section 12 of the comp.lang.c FAQ, <http://www.c-faq.com/>.
--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.
- References:
- HELP!! Two questions from <<the c programming language>>
- From: Tak
- Re: HELP!! Two questions from <<the c programming language>>
- From: Ian Collins
- Re: HELP!! Two questions from <<the c programming language>>
- From: Tak
- Re: HELP!! Two questions from <<the c programming language>>
- From: Ian Collins
- HELP!! Two questions from <<the c programming language>>
- Prev by Date: Re: Integrated debug library for a C program
- Next by Date: Re: HELP!! Two questions from <<the c programming language>>
- Previous by thread: Re: HELP!! Two questions from <<the c programming language>>
- Next by thread: Re: HELP!! Two questions from <<the c programming language>>
- Index(es):
Relevant Pages
|