views:

499

answers:

10
+1  Q: 

Great C tutorial?

I really want to learn C (I'm planning on joining an open source GNOME project). What would be a good tutorial?

+25  A: 

The C Programming Language (often referred to as "K & R") is almost universally considered to be the best resource for learning C.

Chad Birch
Not only is that book the best for learning C, but is considered to be among the great programming language books, period. Certainly the place for a new C programmer. I was able to read it as a high schooler, and was only really confused for a while by the idea of recursion; everything else, the book made very easy.
Brandon Craig Rhodes
It's a very clear book, and rather short as well.
Nighthawk
A: 

It's more a faq than a tutorial, but it is quite useful: C - faq.

Concerning Gnome programming: Gnome guidelines

And here are some tools every C programmer needs:

Tom
+3  A: 

The Official GNOME Developer's Guide: http://oreilly.com/catalog/9781593270308/

Amit
+2  A: 

Tutorials might me semi useful at first, but I always learned a language by actually developing useful code.

I'd recommend you check out some of the Gnome Love Projects. They are generally smaller tasks for people who are interested in joining the gnome development community. They will help you get used to the dev environment, and submitting patches and the style & conventions they use. Most will teach you something you didn't know about C also.

Brian Gianforcaro
A: 

You may refer C Programming Notes meant to supplement K&R.

aJ
+1  A: 

The C book is a good and free ebook.

Bastien Léonard
A: 

Always avoid tutorials (written by kids, for kids) Read KR

That's terrible advice. Many people (including myself) have learned a great deal from tutorials.
Anthony Cuozzo
A: 

I would seriously advice you to check out Bruce Eckel's freely available "Thinking in C", which is a flash-based introduction to the C family of programming languages:

A Flash-based audio-visual seminar to introduce you to the fundamentals of the C language which will help you move on to C-based languages like C++, Java and C#.

none
+1  A: 

While "The C Programming Language" is certainly a great book and a very good introduction to the C language, it has several drawbacks:

  • It is somewhat dated, the 2nd edition (the last one) covers only C89 which is now 20 years old. While C99 (the current Standard) isn't universally supported, there are a number of features from it that are supported by many implementations and exposure to them is useful.
  • It isn't comprehensive. It doesn't cover many of the standard library functions in any detail and certain intricacies are not explored in depth.
  • The text assumes you are already an experienced programmer and has a very terse style which doesn't work well for everyone.

If you are looking for a more beginner-friendly, comprehensive, or up-to-date book, I would strongly recommend C Programming: A Modern Approach, 2nd Ed. It covers every aspect of the language and the standard library in depth, including C99, and is extremely well-written. While the list price is rather high, it usually isn't difficult to find a copy for around $60 USD.

Robert Gamble