By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,655 Members | 1,005 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,655 IT Pros & Developers. It's quick & easy.

k&r book

P: n/a
i've been told that k&r doesn't actually teach ansi C properly
is this true?
Nov 13 '05 #1
Share this Question
Share on Google+
14 Replies


P: n/a
conrad wrote:
i've been told that k&r doesn't actually teach ansi C properly
is this true?


Worked well for me. I learned from the first edition; and use the
second edition from time to time as a quick reference. The second
edition seems fairly current.

Have you experienced difficulty learning from the book? You're
invited to ask for help/clarifications here.
--
Morris Dovey
West Des Moines, Iowa USA
C links at http://www.iedu.com/c
Read my lips: The apple doesn't fall far from the tree.

Nov 13 '05 #2

P: n/a
conrad wrote:

i've been told that k&r doesn't actually teach ansi C properly
is this true?


It, and any other book, does not teach. However it is quite
possible for those skilled in the art of reading to learn from it
(and other books).

Should I be misconstruing your question, there are slight failings
in C90 conformance. Most of them are covered quite adequately in
the errata.

Should I still be misconstruing your question, yes it does not
adhere to Ansi C as of 2003, which is actually C99. Ansi adopts
the ISO C standard bodily. Since the book was written about 10
years before the C99 standard was published, I don't consider this
a fatal flaw.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!

Nov 13 '05 #3

P: n/a
On 25 Nov 2003 20:37:39 -0800, co****@lawyer.com (conrad) wrote::
i've been told that k&r doesn't actually teach ansi C properly
is this true?


There's a newer edition of "Programming in C" by the Kernigan and
Ritchie pair with fake stamp on the cover that says "ANSI C Edition".
I saw it on the shelf at the local Chapters last year.

The original 1970s edition doesn't teach ANSI-C, but I would hope that
this edition would -- considering the title.
----------------------------------------
Thanks,
MCheu
Nov 13 '05 #4

P: n/a
mcheu wrote:
On 25 Nov 2003 20:37:39 -0800, co****@lawyer.com (conrad) wrote::

i've been told that k&r doesn't actually teach ansi C properly
is this true?

There's a newer edition of "Programming in C" by the Kernigan and
Ritchie pair with fake stamp on the cover that says "ANSI C Edition".
I saw it on the shelf at the local Chapters last year.

The original 1970s edition doesn't teach ANSI-C, but I would hope that
this edition would -- considering the title.


That's the second edition. It is intended to cover ANSI C (C89), and
does so quite well. There are errors, as there are in all books. The
concerned reader should consult the errata list.

-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.

Nov 13 '05 #5

P: n/a
I find 2nd edition (ANSI C) quite good actually.

conrad wrote:
i've been told that k&r doesn't actually teach ansi C properly
is this true?


Nov 13 '05 #6

P: n/a
Pushkar Pradhan wrote:
I find 2nd edition (ANSI C) quite good actually.


Please stop top-posting.

-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.

Nov 13 '05 #7

P: n/a
Kevin Goodsell wrote:
Pushkar Pradhan wrote:
I find 2nd edition (ANSI C) quite good actually.


Please stop top-posting.


Right. Nevertheless, he has a good point (albeit rather understated).

K&R2 is, in fact, quite superb.

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #8

P: n/a
Richard Heathfield wrote:
K&R2 is, in fact, quite superb.


Would you recommend it as an introduction to the general subject of
programming, that is, to someone completely new to the subject?


Nov 13 '05 #9

P: n/a
On Wed, 03 Dec 2003 15:15:02 GMT
Elliot Marks <em****@email.net> wrote:
Richard Heathfield wrote:
K&R2 is, in fact, quite superb.


Would you recommend it as an introduction to the general subject of
programming, that is, to someone completely new to the subject?


If they are starting with C then I would recommend that they get K&R2
*and* a good programming tutorial.

To quote from the Preface to the First Edition, "The book is not an
introductory programming manual; it assumes some familiarity with basic
programming concepts lie..."

That said, some people have learnt to program from K&R so it is not
impossible and it is IMHO an excellent reference book as well as being a
good C tutorial.
--
Mark Gordon
Paid to be a Geek & a Senior Software Developer
Although my email address says spamtrap, it is real and I read it.
Nov 13 '05 #10

P: n/a
In <3F**************@email.net> Elliot Marks <em****@email.net> writes:
Richard Heathfield wrote:
K&R2 is, in fact, quite superb.


Would you recommend it as an introduction to the general subject of
programming, that is, to someone completely new to the subject?


Yes, it teaches a lot more than just C.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #11

P: n/a
Dan Pop wrote:

In <3F**************@email.net> Elliot Marks <em****@email.net> writes:
Richard Heathfield wrote:
K&R2 is, in fact, quite superb.


Would you recommend it as an introduction to the general subject of
programming, that is, to someone completely new to the subject?


Yes, it teaches a lot more than just C.


Dan apparently holds a high opinion of the programming
aptitude of the populace at large ...

IMHO, a complete beginner needs to learn some fundamentals
that K&R omit. Chief among these is the understanding that
computers are both literal-minded and stupid; they'll do what
you tell 'em even if you tell 'em something ridiculous. Since
programmers spend a lot of effort trying to get their software
to appear smart, beginners are often unaware of the intrinsic
thoughtlessness of the "thinking machine."

That, I think, is the single most important thing to know
about computers. Beyond that, the beginner must acquire some
knowledge of binary arithmetic, comprehend why 1/3 and 1./3
are different, appreciate that 1./3*3 might not equal 1, have
some idea of why one would want to write a subroutine, and so
on. K&R start from the premise that the reader already knows
such things, and address themselves to how C deals with them.

You've got to know what "intransitive verb" means before
you can make full use of a English-German dictionary.

--
Er*********@sun.com
Nov 13 '05 #12

P: n/a
In <3F***************@sun.com> Eric Sosman <Er*********@sun.com> writes:
Dan Pop wrote:

In <3F**************@email.net> Elliot Marks <em****@email.net> writes:
>Richard Heathfield wrote:
>
>> K&R2 is, in fact, quite superb.
>
>Would you recommend it as an introduction to the general subject of
>programming, that is, to someone completely new to the subject?


Yes, it teaches a lot more than just C.


Dan apparently holds a high opinion of the programming
aptitude of the populace at large ...


Of the populace that is really motivated to learn computer programming.
That's quite different from the populace at large...

More than one person claimed, in this very newsgroup, that he learned C
from one K&R book or another with no prior exposure to computer
programming. So, it's possible.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #13

P: n/a
Elliot Marks wrote:
Richard Heathfield wrote:
K&R2 is, in fact, quite superb.


Would you recommend it as an introduction to the general subject of
programming, that is, to someone completely new to the subject?


Yes if the student is being taught programming by a good teacher who is also
a good programmer.

Also yes even if the student is self-teaching, provided he or she is a
bright bunny.

But there are other books, the two obvious choices being Deitel and Deitel,
and of course K N King. The clever student with access to an excellent
bookshop will go to that bookshop, take all three books off the shelf, sit
down with them for half an hour over a cup of coffee, and browse through
them trying to decide which of them seems to match his or her mindset most
closely.

And then buy all three of them anyway. :-)

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #14

P: n/a
Richard Heathfield wrote:
But there are other books, the two obvious choices being Deitel and Deitel,
and of course K N King. The clever student with access to an excellent


"Pointers on C" [1] and "C Programming: A Modern Approach" [2] are my favorites.
Both are _very_ good books, without big pitfalls.
[1] http://www.cs.rit.edu/~kar/pointers.on.c/
[2] http://knking.com/books/c/

Nov 13 '05 #15

This discussion thread is closed

Replies have been disabled for this discussion.