tags:

views:

517

answers:

8

I have this fantasy of becoming a really good C programmer, but I've found it very hard to find learning resources on tackling big C projects. I've learned C a few times (I forget the fundamentals, since I don't code big projects in C) from K&R, O'Reilly's Practical C, and A Book on C. However, none of these cover the existing Unix libraries, numerical issues (floating point errors, etc), Makefiles, advanced debugging with gdb, linking, etc. What's the best way to learn this stuff? And what's a good book that covers all of this?

And I'm not interested in C++, FYI.

+1  A: 

This is the Original ANSI C book for Linux

Chathuranga Chandrasekara
Mahesh Velaga
+9  A: 

I would try Advanced Programming in the UNIX Environment by W. Richard Stevens. I haven't actually read this one (never felt the need, picked up what I know of UNIX/POSIX programming through other means), but his books are generally great.

unwind
This book is great.
alex tingle
Would this book prepare me to build, say, some statistical computation utilities? Or is it more angled towards system utilities, daemons, etc?
Vince
Stevens rocks in general.
phoebus
This is a wonderful book, but probably not what Vince is looking for. From the description: "If you are an experienced C programmer with a working knowledge of UNIX, you cannot afford to be without this up-to-date tutorial on the system call interface and the most important functions found in the ANSI C library."
Mark Harrison
+3  A: 

you may want to look here
Although for the issues you pointed out i generally rely on internet resources.
I found this useful for understanding the C compilation system.

Neeraj
+2  A: 

The Unix Programming Environment

http://cm.bell-labs.com/cm/cs/upe/

by Kernighan and Pike, bringing Unix enlightenment since 1984!

Mark Harrison
A: 

You didn't give reasons why you want to learn C in 2009 but I suggest to reconsider. Computer languages have come a long way since C was introduced.

Have a look at Python, Java or C# (try Mono). They will make you much more productive since they solve all those basic tedious tasks that you need to waste your time on in C. Examples: Error handling, linking, memory management.

Aaron Digulla
Sure, Java does error handling for you, if by "handling" you mean "spews an incomprehensible 600-line backtrace and aborts".
caf
I want to learn C because I know Python really well, R, php, perl, and a tiny bit of both lisp and erlang. C is the basis for Unix, python, perl, and R. I think it's more useful to learn to a language that will allow me to peek into the source of my favorite projects than a language to "get stuff done" at this point. Also, it's fast and will have a good effect on the way I think about computation in general.
Vince
A: 

Not especially focused on C programming, but a sum of wisdom for UNIX/Linux programming in C is Eric Raymond's: The ART of UNIX programming.

Didier Trosset
A: 

Understanding UNIX/LINUX Programming: A Guide to Theory and Practice

This book provides an excellent introduction to Unix system programming in C and is one of the better Unix system programming books I've read. Many other books also cover the topic well, but they are more like manuals. This book is more readable and clearly explains how things work.

From Prentice Hall Companion Website:

This clear, readable text explains how Unix/Linux works and shows how to write programs that make full use of operating system services. The text explains all the major ideas of Unix programming:

  • file I/O
  • file systems
  • device I/O
  • the terminal driver
  • timers
  • signals
  • processes
  • pipes
  • stream and datagram sockets
  • network programming
  • POSIX threads
  • semaphores
jschmier
+2  A: 

I think this book "Let Us C - Yashwant Kanetkar" will be a really good book to refer. It has a well patterned way of explaining the concepts of C programming language. Have a look at this