Book on C programming - suggestions?

I have been programming various things for about four years now, but it wasent until the competition this year that I used C. Thankfully there was nothing overly complex that had to be done, and the code was very well commented so I did not have too much trouble with it.
This said, I still do not feel totally comfortable with C and want to get more familiar with it, so I was wondering if anyone could recommend a good book on it (I like books better than web pages, but if you do know of any really good pages, they would also be much appreciated). I have been looking around on, but they have something like 1000 titles in their “C & C++ Programming” section which makes it very hard to decide.
The one book I did like is “Programming with C: A Modern Approach” which I borrowed from my friend, but I do not have the $100 to buy it online and he wanted it back.

try your local library. I don’t think they’re locally in high demand.

Ya, I could do that, but I like books that I can keep around for reference (and because I am really bad at remembering to return things to the library).
Its a good idea thou, maybe I’ll go around corner one day to take a look.

Welcome to the only language worth knowing! :smiley:
It’s got a steep learning curve, but it’s oh-so-worth it.

The best book is, hands down, the beloved “K&R” book. Whatever you pay for it, it’s worth it. (Make sure you get the ANSI C version.) Oh, and use a standards compliant compiler, like GCC. Have Fun! Feel free to PM me questions. I highly reccommend the exercises in that book.

PS: This site is great!

hhmmm I cant seem to find the second edition on (.ca so I dont have to convery from american $$). They have the first edition thou, so should I just go with that?

You should get the second edition. Here’s a link to it at As has been said elsewhere, K&R is more like a dictionary of the language, not something you’d use as a primer.


Ah, great, thanks. I had found that one but I didnt notice the “second edition” in the title of the book (I assumed it would be in the description somewhere - thats what happens when you try and do things late at night).

I’d recommend “The Complete Reference: C++” (forth edition is the one I have, but it might have something newer. Doubt that though, it was only 2 or so years ago.) It has the first part covering C and the second C++. Great book. Especially since you’ll eventually want classes… (ignore Phrontist…) :slight_smile:

Bah! I know many, many, people who learned C from K&R! I wouldn’t do that if you were a total newbie, but for anyone with a modicum of conceptual programming experience K&R is the way to go. The appendices to function as a great refrence though.

I know you want a book, but maybe also going to a few websites:

These aren’t for robot programming, but for PC programming

I’m going to suggest that you don’t buy any programming book whose title ends with “…for Dummies”. Definatly NOT a good investment.

Thanks again,
These have all been really helpfull suggestions.
I ended up getting K&R and I really like it so far, great book. I cant wait for exams to end (5 more days!) so I can spend lots of time with it!

you all were talking about textbooks about c and stuff like that…

im looking for a cheaper more beginner book for c, that explains everything from the basics and just teaches me the whole language in a normal paperback, and codes and such and things i can learn and use when programming a robot. what do you suggest?

I strongly suggest this:

It’s a scaled down version of K&R but it has virtually everything you need to program a robot… And it’s free.

Oh, and about the K&R, I also had it recommended to me, but I haven’t yet found it in any bookstore. Other than on-line, is there any place that I might be able to find it?

I would have to disagree. Granted, for a seasoned programmer, the Dummies Series is not worth it, but if you need to teach a new student with no experience, the Dummies series is great.

But for your purposes, I would suggest the Deitel & Deitel C book. I’ve used their series for C, C++, and Java. Very detailed and worthwhile.

-Tony K

I’d use the “Learn C/C++ in 24 Hours” series. It goes step-by-step for people with no programming experience, and is in the $20 to $30 range.

I just got a free guide to C from this website. Yes, it goes over the BASICs of C, and of course its close to JAVA, but even with the code, it takes a while to ASSEMBLE…yes, I know I’m a nerd. DEAL WITH IT!!

I personally like this book:
Pointers on C by Ken Reek.
He was a CS Professor at RIT. Retired last year. We used that book in
a class here. It’s an excellent reference as well as a teaching guide.
I have a copy and i’ll never part with it.
That guy has forgotten more about C programming than I will ever know.