views:

297

answers:

9

I'm looking for good websites, and possibly books, to help me improve my C (not C++). I've been coding for over 10 years, mainly in Java, but my experience of C is minimal. I don't need something that explains what an 'if' statement does, I'm more interested in best-practices, and common pitfalls, with an emphasis on the things likely to trip up someone with my background (I'm thinking memory management and pointers).

+6  A: 
Gary Willoughby
You'll also need a copy of the 90 and/or 99 standard, but not necessarily in dead-tree format.
Steve Jessop
+14  A: 
Bobby Jack
Michael E
+1  A: 

I mostly program C, and the only two general books I own are:

  1. K&R, The C Programming Language
  2. Efficient C Programming (Heller IIRC)
Aiden Bell
+5  A: 

I'd recommend this as well: Expert C Programming

ennuikiller
I agree. I reread it once every year.
Jonke
+1  A: 

this site is a good adjunct to the K&R book: c-faq.com

use it to see good, concise examples of how things like Pointer Arithmetic work

kloucks
A: 

Take a look at the MISRA C coding standard.

It is a bit boring to read, but it helps to avoid the many ill-defined areas of C.

The PDF is available for 10£.

starblue
+1  A: 

Apart from K&R, which is answer #1, I always found what I needed over here

zedoo
+2  A: 

The two books in my office that people have or share are The C Programming Language by Brian Kernighan and Dennis Ritchie, and C: A Reference Manual, 5th edition by by Samuel Harbison. I own multiple copies of each myself for at home, and just about every good C programmer I've met has copies of these handy.

Expert C Programming: Deep C Secrets by Peter van der Linden is also a good book on the C language, its usage, and its evolution. I can easily recommend it. The Standard C Library by P.J. Plauger can also be an useful reference about the tiny, compared to Java, standard library that is common to C.

The C Programming FAQs is also available in printed edition. As well reviewing Writing Solid Code by Steve Maguire , Code Complete, 2nd edition Steven C. McConnell, Writing Secure Code by Michael Howard, Building Secure Software by Gary McGraw and John Viega, though these are mostly language agnostic, they discuss issues that are critical in writing robust, secure, and maintainable professional code particularly in regards to language features C lacks, such as advanced memory management - i.e. garbage collection, as well Secure Programming Cookbook for C and C++ is a handy cookbook style reference to write code that both isn't (easily) exploitable and can be more robust as a secondary benefit, and the book's corresponding website.

I didn't mention any embedded development related titles, although that is one of (several) areas that is still heavily using C, and is a demanding environment, both as a target platform, and typically the development / build-test environment.

I hope that helps.

mctylr
A: 

For challenges to put your new knowledge to the test, check out uva online judge and Projecteuler.net

http://uva.onlinejudge.org

mikeyickey