Re: HELP!! Two questions from <<the c programming language>>
- From: Chris Dollin <chris.dollin@xxxxxx>
- Date: Thu, 31 May 2007 10:12:38 +0100
Tak wrote:
No, that's not how it works here. You post your attempt, we help you
with problems. We don't do homework.
(fx:hint (fx:snipped-signature))
No, I think you are misunderstanding.
It's not homework;
I can't work out Exercise 1-9.
My code of Exercise 1-10 is like this:
#include <stdio.h>
main()
{
char c;
/int/ c.
while ((c = getchar()) != EOF)
`getchar` returns an `int`, because it must be able to return
every character value /and one more/, viz EOF. (Yes, this
presents problems on systems where `sizeof(int) == sizeof(char)`.)
I don't know whether it's right or not?
Does it pass your test cases?
--
"You've spotted a flaw in my thinking, Trev" Big Al,/The Beiderbeck Connection/
Hewlett-Packard Limited registered office: Cain Road, Bracknell,
registered no: 690597 England Berks RG12 1HN
.
- References:
- Prev by Date: Re: HELP!! Two questions from <<the c programming language>>
- 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
|
|