4 ms·
K&R is an easy read and it will give you the basics if you want to go further. Just realize that modern production C is different and don't copy-paste this cod
by loumf 11y ago
K&R is an easy read and it will give you the basics if you want to go further. Just realize that modern production C is different and don't copy-paste this code into real things (they are glossing over a lot of details -- especially with regards to safety).
Next, I'd try "C the Hard Way" which is just as beginner, but is an attempt to make C programs safer (and expose you to some of the glossed over details)
- ghrifter 11y agoI've heard a few bad things about "Learn C the Hard Way", but I have heard good things about K&R so I'm gonna see if that book is at my library (it absolutely should be). Another idea I had was maybe to just program in Rust. I'm not sure :)
- loumf 11y agoIt's really a shame that this book gets a bad rap. It's mostly because of a chapter it used to have critiquing K&R (which I thought made a good point) and possibly the online persona of the author (again, I don't agree, but I can see why others might have a problem) In any case -- it's a great book for beginners, freely available online, and you'll know in 5 minutes whether you like the style or not.
- deleted 11y ago[deleted]
- forbidden404 11y agoI am, by no means, an expert in C, actually I'm a beginner. When I started reading K&R I was aware of the time it was written and how it follows certain premises. When I saw several arguments with Zed Shaw going on here, most of the time I've got the image of someone that wouldn't like to accept he was wrong in some ways. I'm not trying to take the value out of his work, I think Learn C The Hard Way is a great way to learn C, but as you said, his online persona didn't help much.
- hackerboos 11y agoK&R is definitely not 'modern C'. I recommend "C Programming: A Modern Approach" by K. N. King combined with "21st Century C" recommended already.