I need a good C Programming book!

Status
Not open for further replies.

RST

Ars Scholae Palatinae
916
I've learned how to program using C++ and just recently Java. This quarter I'm taking an Advanced Data Structures course and my teacher is forcing us to code in plain C. I have never coded in just C so right now I'm doing pretty horrible. Can someone recommend a good C book? A friend recommended C Unleased by SAMs(?). Any others? Here are a few I'm considering:

C how to program - Dietel & Dietel (I thought D&D's C++ book was great and I'm hoping the same from this one) $70

C Unleased - SAMs (recommened by a friend - its really fat so its not something I want to keep in my backpack when I go to the lab. I may get it as a home reference though)

Practical C Programming - O'Rhiely - (O'Rhiely books seem pretty popular)

The C Programming Language - sorry forgot author but its white and not a very big book so it seems good to carry around.

The Complete Resource C - another fat book. maybe just for reference.

Any others I should be looking for? A book(or even a website) which goes over most of the syntax difference between C & C++ would be great!! I was in horror when trying to create a simple 2D array in C. wtf! And I was stuck for hours because I didn't know I couldn't create a variable after initializing other variables in the code. Little stuff like this is killing me in class!

Any other "must have" book recommendations for C++, Java, etc would be great too(thought I really need C right now)! Thanks!
 

Slamtilt

Ars Tribunus Militum
2,575
The C Programming Language - sorry forgot author but its white and not a very big book so it seems good to carry around.

:D
That's like saying "It's a black book and I can't remember the author, and it's all about these guys in the middle east thousands of years ago"!
:D

Edit: It's very good and highly recommended, BTW. The white one, I mean.
 

Slamtilt

Ars Tribunus Militum
2,575
Before you get anything by Herb Schildt, be aware that he's the butt of some rather uncomplimentary jokes in comp.lang.c

Here's a link to their FAQ (well, the alt.comp.lang.learn.c-c++ FAQ really). Have a look at the answers to questions 13-16.

Edit: I can't resist. Here's one of the comments on C: The Complete Reference:

C: The Complete Nonsense
C: The Complete Reference is a popular programming book, marred only by the fact that it is largely tripe. Herbert Schildt has a knack for clear, readable text, describing a language subtly but quite definitely different from C.
 

Armethius

Ars Tribunus Militum
2,747
Well I see your point about Herbert Schildt, but I don't see that it still applies. For one, the reviews written in that FAQ are VERY dated. The errors pointed out are referencing the FIRST edition. We're on the fourth edition now. I would assume most of those have been fixed. Besides, all books have errors.

I still can't see how having some errors in a 750 page book qualifies you as a "bad author". I still recommend "C: The complete reference" by Schildt (4th ed) in spite of the previous comments.
 

mebeSajid

Ars Praefectus
4,022
Subscriptor
K & R is good.

Also,
if a C book doesn't mention realloc, put it back.

If it has the line

code:<HR>
Code:
 item = realloc(item, sizeof(*item) * some_number);

burn it. Burn it right there in the store. Burn every last one of them. This last comment was brought to you by CS2130 at Georgia Tech.

Personally, I use a book called Efficient C Programming by some guy named Weiss. It serves what I need pretty well.

Sajid
 
Having two books is a boon. When one doesn't make something clear for you, you can read about the same thing in another book and often get a different perspective.

I'd recommend:

"C How to Program" (Deitel and Deitel)
These guys are _very_ comprehensive

"Practical C Programming" (O'Reilly)
This was my first C book, so I guess its got sentimental value. I found the language very straightforward, and the book itself very readable. 'Sides, its got a cool cow on the cover.

-Kurt
 

BlackHex

Ars Tribunus Angusticlavius
9,639
Subscriptor++
If you expect to use C in the future you must get

icon2.gif
K&R (The C Programming Language)

It is the true book on the subject.
 

Victim12

Ars Tribunus Militum
1,978
I ended up liking the Practical C Programming book published by O'Reilly, even though I thought it was kind of lousy at first. Coming from C++ it helped me get up to speed very quickly on how to do modules and data structures without having C++ features. Peter van der Linden's book Expert C Programming Deep C Secrets was also a very good book that helped me understand some more complicated things about C.
 
Status
Not open for further replies.