Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

This reply to the question "I don't know C. And why should I learn it?" has me interested in learning C. What is a good self-instruction program (textbook/website/OpenCourseWare, etc.) for someone who already has lots of experience in high-level languages?

share|improve this question

closed as not constructive by Thomas Owens Apr 14 '13 at 11:27

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

3 Answers 3

up vote 18 down vote accepted

This is a clichéd answer, but my intro to C programming was Kernighan and Richie's The C Programming Language.

share|improve this answer
1  
No question this is the best resource to start with. –  Dave Kincaid Dec 22 '10 at 22:29
1  
this is without question the best resource out there. thin, small, to the point. if you're experienced you'll know C in a few hours and instantly understand where all that stuff in the language you're using now came from. very informative. –  Dr. McKay Dec 22 '10 at 23:15
    
The only drawback to using K&R2 is that it doesn't cover the C99 standard. Since C99 support is still somewhat spotty (glares at Microsoft), this may or may not be an issue. My day-to-day reference is Harbison & Steele's "C: A Reference Manual"; it's not a great teaching reference, but it will make an indispensable companion reference. –  John Bode Dec 23 '10 at 0:21
    
Just to echo what the others have said, this book is essential reading, for anyone, far more so for learning C. –  Orbling Dec 23 '10 at 0:34
    

If your goal truly is to understand what goes on under the hood, then perhaps, instead of learning C and writing a toy program in it, you instead look at a C compiler and understand how that works. As far as compilers go, a C compiler is one of the simplest, as the language doesn't have all that many high-level features.

As for which compiler, I would take a simple compiler with an easy to understand machine architecture, so you're not mucking about too much with x86 instructions.

I'd suggest the C-- compiler (written in Java) which outputs MIPS assembly.

share|improve this answer

Leendert Ammeraal's "C For Programmers", while VERY dated now (15 years old or more) is by far the best thing I have ever seen along these lines.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.