Ask HN: Should I use K&R to learn C?
1–10 of 70 posts
Re: Ask HN: Should I use K&R to learn C?
#2Re: Ask HN: Should I use K&R to learn C?
#3Re: Ask HN: Should I use K&R to learn C?
#4The gist of it was that K&R ignores the safety problems in C and there is no discussion of the habits/constructs seasoned C programmers have developed to make sure their code is safe. Of course, many of those habits were developed after K&R, but that's why we need revisions and new sources.
In its place, Zed Shaw (the author), updated Learn C the Hard Way to concentrate on using C safely -- it is an awesome way for a newbie to learn C. Even if you don't agree (and want to use K&R), read this alongside it.
Re: Ask HN: Should I use K&R to learn C?
#5You'll get a modern approach to C programming and it had great exercises.
Re: Ask HN: Should I use K&R to learn C?
#6You will be better served by reading a more recent (C99) and carefully considered book such as K.N. King's C Programming: A Modern Approach.
Re: Ask HN: Should I use K&R to learn C?
#7This is also a good presentation for safer C programs https://www.bsdcan.org/2010/schedule/events/172.en.html
Re: Ask HN: Should I use K&R to learn C?
#8However the exercises in K&R are excellent so make sure you do them all. Actually the cost of K&R is justified just for the exercises IMHO.
Also get Understanding and Using C Pointers by Richard Reese, it is a must have.
Two other books I very much enjoyed are Head First C and 21st Century C (2nd edition). Head First has some nice "extra" bits like threads and networking in C. 21st Century C explains sensible, modern ways to do things in C and, more importantly, things you should NEVER do in C!
Re: Ask HN: Should I use K&R to learn C?
#9There was a very good critique of K&R in Learn C the Hard Way that got taken down because of (IMO) undue backlash. The gist of it was that K&R ignores the safety problems in C and there is no discussion of the habits/constructs seasoned C programmers have developed to make sure their code is safe. Of course, many of those habits were developed after K&R, but that's why we need revisions and new sources. In its place,…
Re: Ask HN: Should I use K&R to learn C?
#10There was a very good critique of K&R in Learn C the Hard Way that got taken down because of (IMO) undue backlash. The gist of it was that K&R ignores the safety problems in C and there is no discussion of the habits/constructs seasoned C programmers have developed to make sure their code is safe. Of course, many of those habits were developed after K&R, but that's why we need revisions and new sources. In its place,…