Re: prob w/the C prog. lang. book(ANSI C)

From: Dan Pop (Dan.Pop_at_cern.ch)
Date: 04/15/04


Date: 15 Apr 2004 13:16:25 GMT

In <c5lilb$33ohb$1@ID-227552.news.uni-berlin.de> Martin Ambuhl <mambuhl@earthlink.net> writes:

>Peter Nilsson wrote:
>
>> So far, _you're_ the only one claiming there's anything wrong with the code!
>> ;)
>
>I never claimed the code was in any way not valid C, which seems to be
>your hangup. The original poster only told us it didn't work. It
>obviously does *not* work for the purpose of converting temperatures.
>Nor does it correspond, as he and one other person claimed, to the code
>in K&R. He failed to type the program in as it appears, and the result
>is that it doesn't work. Idiot.

I'm sorry, but the only idiot around is you. The code posted by the OP
is a verbatim copy of the program on page 9 in K&R2 (except that the
comments are stripped). If compiled and executed it produces the same
results as those listed on page 8 of K&R2. If you have *any* comments
about its correctness, please address them to Messrs Kernighan & Ritchie.

The K&R1 program you are talking about also exists in K&R2, at page 12,
as a refinement of the program at page 9, but this is, OBVIOUSLY, not the
program the OP was referring to.

The OP's problem is, most likely, that he doesn't know how to install or
how to use his compilers.

Dan

-- 
Dan Pop
DESY Zeuthen, RZ group
Email: Dan.Pop@ifh.de


Relevant Pages

  • Re: bit masking
    ... The *only* C standard ever produced by ANSI is C89. ... by most compilers. ... tutorial book, which can trivially happen if you use a C99 tutorial ... Dan Pop ...
    (comp.lang.c)
  • Re: Dumb Windows linking question.
    ... no mater how you respond to an idiot, he will still act like an idiot. ... >>comes with the compilers, and as I already said I included it. ... any combination libs and dlls. ...
    (comp.programming)
  • Re: Pulling all n-sized combinations from a list
    ... compilers on the Internet would have been somewhat ... that by mentioning Windows, ... And, strange as it may seem, asking questions the ... if they just call you an idiot ...
    (comp.lang.python)
  • Re: Deferencing void pointer
    ... But we're not discussing English here. ... C compilers. ... The usual excuse for this ... Dan Pop ...
    (comp.lang.c)
  • Re: main()
    ... Dan Pop wrote: ... >> I've never come across a decent C tutorial. ... That does not necessarily make him an "idiot". ... won't earn a living as a C programmer, ...
    (comp.lang.c)