5

I really want to learn C. What would be a good tutorial?

Kredns
  • 36,461
  • 52
  • 152
  • 203

10 Answers10

31

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

Chad Birch
  • 73,098
  • 23
  • 151
  • 149
  • 2
    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 Rhodes Apr 20 '09 at 16:27
  • It's a very clear book, and rather short as well. – Anthony Giorgio Apr 22 '09 at 19:39
  • A great book, and a very good book for learning c *if you are already a programmer*, but not necessarily a great book for a rank beginner. – dmckee --- ex-moderator kitten Mar 26 '11 at 02:40
5

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
  • 106,424
  • 25
  • 145
  • 137
4

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

3

Tutorials might be 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
  • 26,564
  • 11
  • 58
  • 77
2

The C book is a good and free ebook.

Bastien Léonard
  • 60,478
  • 20
  • 78
  • 95
1

Here is one resource. http://www.physics.drexel.edu/courses/Comp_Phys/General/C_basics/

Daniel A. White
  • 187,200
  • 47
  • 362
  • 445
1

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

aJ.
  • 34,624
  • 22
  • 86
  • 128
0

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
  • 43,810
  • 29
  • 138
  • 169
0

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

  • 4
    That's terrible advice. Many people (including myself) have learned a great deal from tutorials. –  Apr 21 '09 at 08:31
0

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
  • 5,701
  • 28
  • 32