|
Web-based tutorials Interactive Internet Resources Recommended books Free Compilers Commercial Compilers Generally Useful C Sites Frequently Asked Questions about the C language
The An attempt is being made to set up a C wiki with authoritative content. This site is developing nicely, despite a recent lengthy outage, and is steadily building up some useful C-related content. The URL is http://clc-wiki.net/wiki/ - why not get involved in making it even better? Web-based TutorialsThere are plenty of C tutorials on the Web. Most seem to be written either by inexperienced C programmers who wish to pass on their lack of experience to others (such tutorials should be avoided completely), or by people who make the basic assumption that "obviously my readers will be using the same platform as me". This latter category is harder to dismiss, since some people aren't really fussed about learning the C language per se; they only care about using C on one particular platform. For such people, if they can find a good tutorial that devotes itself to their platform, that's great. But when I learn about a new tutorial site, I'm afraid I can't always afford the time to check the site out in detail, so I generally wind up looking for obvious errors (of a kind that a C expert would either not make at all or would at least quickly correct), or platform dependent advice. If I find either, I deduce that the tutorial, for whatever reason, is not suitable for teaching the C language itself, and read no further. It's quite difficult to pass muster when the standard is so strict, but two sites do meet my criteria of correctness and portability.
Interactive Internet ResourcesThe two most important ways of getting help with C interactively on the Internet are Usenet and IRC. (I mean "interactive" in the sense of being able to ask a question in your own words and getting an answer from a real live human.) If you're learning C and don't have a teacher to guide you through the language, IRC and Usenet can be handy places to get some quick advice. Beware, though: neither is a substitute for a knowledgeable C teacher (alas, these are rare), or a really good book on C.
Usenet is a batch-driven environment, in which you
subscribe to a news service (this is normally provided freely by ISPs
as part of your Internet "package"), and can post articles
to that service. The best Usenet "newsgroups" on which to
get C help are Please read the comp.lang.c welcome notice before diving too quickly into the newsgroup. This notice, as well as being on the Web, is posted in the newsgroup on a regular basis. Thank you.
IRC (Internet Relay Chat) is more immediate. If you are lucky, you can
get a good answer to your C question within a few seconds of asking it.
A considerable amount of C expertise lurks within IRC, although perhaps
not as much as can be found in
Freenode's
The In both Usenet and IRC, judge the quality of the advice you get by the usual common sense criteria: (1) does your advisor take the time and trouble to make his or her thoughts clear, so that you can actually understand what he or she says? (2) does your advisor back up his or her advice, when necessary, by referring to the language definition or to K&R (see the Books section, below)? (3) is your advisor respected by others in the channel, particularly by the ops? Why these particular guidelines? Well, firstly, if ur tld abt stff in hvly abrvtd frm, you may easily misunderstand the advice, even if it's good advice. A good advisor will not risk such ambiguity. Secondly, a good advisor will be aware of the language definition (the ISO C Standard), and will refer to it when it is appropriate. Thirdly, a good advisor tends, over the course of a few months, to acquire a good reputation (whereas, conversely, a poor advisor tends to get a poor reputation).
Be ready to show your code. If you can't fix your problem with the source
code in front of you, it's unlikely anyone else can fix it blind. But
before you do show your code, you should reduce (a safe copy of!)
your program to the minimal possible complete program that demonstrates
your problem. Don't waste other people's time with extraneous junk. Once
you've done that: on Usenet, paste the source code straight into the
article (don't use "attachments" in text-only newsgroups such
as Finally, please remember that those in Usenet and IRC who answer your questions are not under any obligation to you. (If anything, the opposite is true.) Nobody has to answer your questions. If you are polite and not too dense, however, they are generally quite willing to help. Recommended Books and Reference MaterialThere are a great many books on C. Many are of low quality. Some are rather better. I haven't bothered mentioning the low quality books here.
Alas, I cannot read every book on C. I don't have time. So
some of the books mentioned below are recommended purely on
the basis of a 5-minute glimpse in a bookshop, or on the
basis of their reputation amongst C experts. I have marked
the books I've actually read with a If you have never programmed before, and would like to learn C as your first programming language, I suggest either of the following two books: C Programming: A Modern Approach, K.N.King, W.W.Norton & Company, 1996. ISBN 0-393-96945-2
C: How to Program, 5th Ed. Deitel, H.M. & Deitel,
P.J. Prentice Hall, 2007. ISBN: 0-13-240416-8 If you are already an experienced programmer, but just haven't yet learned C, you will appreciate the briefer approach of Brian Kernighan (silent 'g', by the way), and Dennis Ritchie. Kernighan is the 'K' in AWK, and Dennis Ritchie wrote the C language itself. The book is very short (272 pages including the index), but its information density is colossal. This book teaches you more about C than many books four times the size:
The C Programming Language, 2nd Ed. Kernighan & Ritchie.
Prentice Hall, 1988. ISBN 0-13-110362-8 (paperback), or 0-13-110370-9
(hardback). For reference purposes, I generally use The C Programming Language, affectionately known as "K&R", which has an excellent reference section at the back. Nevertheless, several excellent reference books exist; and, of course, the language definition itself is the ultimate reference.
C: A Reference Manual, 4th Ed.
Harbison & Steele. Prentice Hall, 1995. ISBN 0-13-326224-3
I am told that a 5th edition of Harbison & Steele was published in 2002, but have not seen it specifically recommended. (But it's almost certainly well worth getting.) The Standard C Library. P.J.Plauger. Prentice Hall, 1992. ISBN 0-13-131509-9
C Programming FAQs
Steve Summit. Addison-Wesley, 1996. ISBN 0-201-84519-9
ISO/IEC 9899:1999
ISO. Available from various national standards bodies.
The following books discuss various aspects of programming in the C language, but are neither tutorials nor references: C Traps and Pitfalls. Andrew Koenig. Addison-Wesley, 1989. ISBN 0-201-17928-8
Expert C Programming: Deep C Secrets,
Peter van der Linden, Prentice Hall, 1994. ISBN 0-13-177429-8
Problem Solving And Program Design In C, 2nd Ed. Hanly & Koffman. Addison-Wesley, 1996. ISBN 0-201-59063-8 Algorithms in C, 3rd Ed. Robert Sedgewick Addison-Wesley, 1998. ISBN 0-201-31452-5
C Unleashed,
Heathfield, Kirby et al, Sams Publishing, 2000. ISBN 0-672-31896-2
Software Solutions in C,
ed Dale Schumacher, Academic Press, 1994. ISBN 0-12-632360-7
Programs and Data Structures in C,
Leendert Ammeraal, John Wiley and Sons, 1992. ISBN 0-471-93123-3
Numerical Recipes in C, 2nd edition, by
Press, Teukolsky, Vetterling, Flannery, Cambridge University Press, 1992.
ISBN 0-521-43108-5
You may also find the following sites useful: Freenode ##c's wiki also contains a useful list of C books. Free Compilers
It should be remembered, when selecting a C compiler, that many C compilers
also provide a C++ feature. Thus, you may well find yourself downloading a
"C++ compiler", and be wondering whether it will actually support
the C language. The answer is: "probably". I can certainly assure
you that Borland C++, Microsoft C++ ("DevStudio"), and
If you can't find what you're looking for amongst that lot, have a look at the Freenode ##c software page, which contains even more links to compilers and other C software. Commercial Compiler VendorsThese guys should do their own advertising, so I won't do much more than link to their base pages here.
Generally Useful C Sites
The Lysator C Page |