Take the 2-minute tour ×

In the style of Where should a veteran C programmer start in order to master Java?, I ask you the reverse question. I have a lot of experience in Java and programming in general, but I'd like to pick up some C (for some projects I'm interested in hacking). Is there a "quick and dirty" guide tailored for people with a previous CS background? I'd prefer free online resources but appreciate any suggestions.

share|improve this question
Do you really want C? Not C++? Leaving this here anyway: horstmann.com/ccj2/ccjapp3.html en.wikipedia.org/wiki/Comparison_of_Java_and_C%2B%2B –  Francisco P. Dec 12 '10 at 16:37

4 Answers 4

Quite a while ago, Joel Spolsky declared that C programming was critical for all software developers. In that article, he references the Kernighan and Ritchie book, which is the accepted all time classic C book. However, having taught C programming using that book, it's something of a drag for the casual student.

That said, if you're already experienced in Java, that isn't you.

Even so, it's a book that's worth reading. If nothing else, I'd look for it at the library.

This tutorial is a bit dated (especially when compared to ANSI C) but, if you're looking for the fastest brush-up on syntax, it's not terrible.

Given a little basic syntax (which will be very familiar to you), you should be able to go straight to the C libraries. That's where most of the actual functionality that you're going to need will be anyway. I think that you'll find that most of the material required to "master" C will actually be in those supporting libraries.

For completeness, in case you need an actual compiler:

In my day job, my development environment is split between Linux (Fedora 14) and Windows 7. In both cases, I use gcc on the occasion when I need to write C code. While gcc is an accepted standard in the Fedora install, on the Windows side you'll want either MinGW or Cygwin, either of which can give you gcc.

If I was still teaching C programming, I would recommend some combination of the above for the advanced self-directed students.

share|improve this answer
"... for the casual student": I don't think C is the right language for the casual student, casual programmer, or casual anything else. C doesn't hold your hand, you have to be on the ball all the time. –  mu is too short Dec 12 '10 at 18:10
@mu, I'm not going to argue that C holds your hand more or less than any other language. I know that my mental image of C programming (i.e., pointer management) vs. Java concurrency issues is that at least C shows you the knife that it's holding and says "don't mess up that pointer or I'm going to stab you." Java tends to let you set timebombs for yourself so that, when you find the deadlock causing code weeks, months or years later, it's an exciting surprise! ;-) –  Bob Cross Dec 12 '10 at 20:54
I'd hardly call Java, or deadlocks exciting. –  Matt Joiner Dec 13 '10 at 0:59
@Matt, for examples of how Java, C++ and a variety of other fascinating languages can be exciting to the point of podiatric damage, please see the venerable list of how to shoot yourself in the foot: m5p.com/~pravn/foot.html ;-) –  Bob Cross Dec 13 '10 at 1:40

While probably a little on the basic side for an experienced developer, I found "C Programming - A Modern Approach" by K.N. King to be quite good. It's a gentle but thorough introduction to the language and some of the key libraries you'll need. I read the first edition of the book; the provided link is for the second edition.

share|improve this answer

Start by installing Linux, GCC, and following a good tutorial.

share|improve this answer

Although it will be very introductory at first, read the K&R and do the example exercises. They become very challenging after awhile and will give you a good grasp of pointers, structs and other aspects of C that differ from Java. Solutions for every exercise can be found online.

Also check out the Stanford youtube lectures for their class CS107, Programming Paradigms. All of the lectures are available online, as well as assignments and other course materials.

share|improve this answer

Your Answer


