Tutorial :After K&R what book to use to learn programming in plain C? [closed]


After The C Programming Language by Brian Kernighan and Dennis Ritchie, some of the books most favoured by beginners turn out to be ones best avoided, such as anything by Herb Schildt or even the O'Reilly Practical C Programming, and there doesn't seem to be much alternative to these. Otherwise most of the material available is about C++.

Besides K&R and the excellent C: A Reference Manual which I have already, what other books are the best to use for learning to code in C, (plain C89 and not C++), without learning bad practices along the way?


Peter van der Linden's Expert C Programming: Deep C Secrets


C: A Reference Manual by Harbison and Steele

It's not a tutorial book, but it's hands-down the best book on C (even over K&R in my opinion). Used in conjunction with K&R (or any other tutorial), you'll get a great foundation in C.


I would be tempted to read Practice of Programming and Programming Pearls. Both are quite terse books and C orientated


This explains why Schildt is bad. Some more criticism here.

Search SO for C resources.


K&R essentially covers everything you need to know about C, and even implements a few data structures that are commonly used. If you're using *nix and want to learn how to take advantage of the operating system, Advanced Programming in the UNIX Environment, Third Edition is a good reference/guide to common uses such as reading a file, creating threads, etc. Sample code is in C.


I'd say to eschew the books entirely. Pick a project, any project (although not too large), and implement it in C. There's no substitute for simply jumping in and doing it. K&R gives enough knowledge that you can begin stumbling along and gaining the experience that makes for true good learning.


I like Pointers on C by Kenneth A. Reek. I won't do so far as to say it's better than K&R but I certainly found it more friendly and easier to learn from. I started with K&R, but didn't really get a hang of C until I picked up this book.

Edit: I also just found out that the price of this book has skyrocketed since I bought it. So while my recommendation still stands as such, I cannot really recommend it at the current asking price. So if you can find a used copy or a copy at a library then it's worth getting, but at its current price there are other books that are basically just as good for a lot less money.

Expert C Programming is book I consider worth at least looking through once you've gotten the hang of C, although I'm hesitant to outright recommend it. On the plus side it contains a number of good tips and tricks and some very useful advice. On the minus side those tricks and pieces of advice are badly organize, buried among not so useful advice and half the book seems filled with lame jokes, asides and irrelevant (but occasionally amusing) stories. So I'd borrow it from the library, but not pay money for it.

But as you no doubt realize, you'll never really learn C until you write C.


C unleashed.


Pick up your K&R book again, and this time do the exercises. Then compare your code with the code in K&R and see if it has similar elegance in the function interfaces and data structures. This isn't a book to read through quickly and go to the next book. It contains a lot of valuable information, and the exercises will help you to realize some of them that you probably missed on the first reading.


Beginning C by Ivor Horton (3rd edition) from APress is a great introductory book on C programming. This book is very thorough and is not a reference book but a good tutorial from start to end on everything in the C language.

Beginning C by Ivor Horton (3rd Edition)


A great book to learn C is: C BY DISSECTION The Essentials of C Programming by Al Kelley & Ira Pohl

Very easy to read wth lots of great programming examples.


The best textbook on C I have is C: A Software Engineering Approach by Peter A. Darnell and Philip E. Margolis. While it is (undeservedly) not as famous as other books, I found it very readable and it handles all the details K&R skips over.

It has two disadvantages though:

  1. It is from 1996, so it does not cover C99. (This should be fine with you since you are interested in C89.)
  2. It is quite expensive.

Edit: Another book of interest is C Programming FAQs by Steve Summit. While I don't have this book in print, the accompanying web site helped me a lot in understanding the less obvious features of C.


I might also recommend reading C programs. Sadly I haven't done enough of this myself to recommend particular ones.


I agree with McWafflestix, best way to learn any programming language is to just jump in to a project, and look up things as you need them. This is how I've learned... around 4 languages I think? And it's worked consistently.



There are some brief but helpful reviews at (the Russian mirror of) the ACCU, for beginner's C and for advanced C.


K&R is also not the current version of C. ISO or ANSI C is.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »