tags:

views:

507

answers:

5

I've been developing with PHP for a couple of years now, and have a strong grounding in it. But I'd like to learn more about programming languages in general, and want to be introduced to more low-level stuff.

I've decided to learn C, and wanted to get your book recommendations. PHP has been pretty simple for me so far (including the OO stuff, mostly), and I think the reason is that I've always been able to put it to practical use right away, and to be able to see almost right away how something could come in handy.

If there's a C book that can present similar application I think that would work best for me. Perhaps I'll take this newfound knowledge to write PHP extensions where I can find performance improvements to be had in future projects.

+13  A: 
Roel
Onorio Catenacci
Yeah, 3 recommendations of the same book in less than 60 seconds - I guess that settles it :)
Roel
It should be noted that the current version looks slightly different than the provided image. The black bar in the top right corner is now a red "stamp" like image next to the giant blue C.
Thomas Owens
+1  A: 

You may try this book but be prepared; C is a major shift in orientation from any OO language. The K & R book (which I've linked) is still, I think, one of the best introductions to the C programming language.

Onorio Catenacci
+2  A: 

The seminal c book: K&R: The C Programming language

TK
+2  A: 

Although this is not what you've asked, and my advice may not be popular here, my recommendation is that you skip C and learn C++ with a book such as the excellent Accelerated C++: Practical Programming by Example by Koenig and Moo.

I suspect you may get more value out of C++ than C in your career, and you can take the OO knowledge you've accumulated with you.

Galwegian
Actually Galwegian, I think that's good advice and I was inclined to say that myself.
Onorio Catenacci
I disagree. I think it's important to know a variety of paradigms. Just learning OO is shooting yourself in the foot in the long run. C is a great language for learning procedural style, and the syntax is very much like PHP.
Thomas Owens
While there are probably more jobs in C++ than C, the same can be said for C#/.NET instead of learning C++.
dragonmantank
I did say that I hadn't expected my advice to be popular here. It's still my opinion. If I were going to learn one of the two from scratch today, I'd choose C++ :-)
Galwegian
Although this is not what you've asked, and my advice may not be popular here, my recommendation is that you skip C++ and learn Java
mike
+1  A: 

I would also suggest Pointers on C By Kenneth Reek.

Its a little bit expensive but was invaluable to me in the courses that I took on the C language. Making the jump from an OO language to a structured language like C should be a breeze. The hardest thing would probably be pointers. Reek covers pointers from the very beginning and emphasizes through the whole book making this a great book for people who know how to program but want to get the most out of their C experience.

WaxEagle