Zach said:
> On Mar 13, 2:56 am, Richard Heathfield <r...@see.sig.invalid> wrote:
>> Zach said:
>>
>> > What are the best websites (or HTML or PDF free books available for
>> > download and if so where) for learning C?
>>
>> > Is this a good site:
>> >http://www.space.unibe.ch/comp_doc/c_manual/C/cref.html
>>
>> No, it isn't.
>>
>> If you'd like a list of reasons, let me know. If you'd rather save time
>> and just have the answer to your original question, check these out:
>
> Morning Richard,
>
> I am curious why that site is substandard in your view.
As many bugs as I can eat in five minutes:
* The site doesn't seem to draw a clear distinction between C and C++.
* "The following list shows all the ANSII defined C keywords. I have
included sizeof because it looks like a keyword and it keeps the table
below tidy...." - let's forgive the misspelling of ANSI, but why the
distinction for sizeof? It *is* a keyword.
* "The order (precedence) that operators are evaluated can be seen here." -
order of evaluation has little to do with precedence - the only relation
between them is kind of accidental.
* "C has three types of statement." - six, actually: the labeled-statement,
the expression-statement, the compound-statement, the selection-statement,
the iteration-statement and the jump-statement.
* "When a local variable is defined - it is not initalised by the system,
you must initalise it yourself." - not true for static objects. Locality
is to do with scope, not duration, and static objects can be local.
Nevertheless, they *are* default-initialised if you do not specify an
initialiser.
* "double is used to define BIG floating point numbers. It reserves twice
the storage for the number." - ISO imposes no such requirement on
implementations.
* "An operator must have operands of the same type before it can carry out
the operation." - not true. Consider, for example, the expression p +=
strlen(s); where += takes a pointer as its left operand, but a size_t as
its right operoh dear, that's your five minutes.
> Are we allowed to post questions in this channel
group
> about the K&R Exercise?
Yes.
> I saw there is an official answer book but it costs $60 or
> some insane price for such a small book!
See also
http://clc-wiki.net/wiki/ which contains a K&R answers section.
> I will invest in a new copy thanks. Is a 3rd Edition planned or have
> the recent additions to the ANSI standard not been sufficient to
> warrant coverage in a new edition?
Last I heard, the answer was that no third edition is planned. (The C99
changes would have been significant if there had been widespread take-up
of that Standard by implementors, but there hasn't been.)
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999