C

Publisher’s information Comments
The C Programming Language
2nd Edition
by Brian W. Kernighan and Dennis M. Ritchie
1988
Prentice Hall
ISBN 0-13-110362-8

This is the classic K & R book on C that covers most of the language in its brief 272 pages. When I was programming C all the time, I owned two copies of this book, one for use at work and the other for use at home.

This book is a good place to start if you’re just learning to program in C. However, there are probably more comprehensive texts available now.

Expert C Programming: Deep C Secrets
by Peter van der Linden
1994
SunSoft Press
ISBN 0--13-177429-8

This brilliant book taught me a lot about C. I read it from cover to cover several times when I was programming exclusively in C.

Chapter 1 provides a brief history of C, including the ANSI C standard. Chapter 2 discusses the features of the C language, including the many things that are wrong with the language.

In Chapter 3, "Unscrambling Declarations in C", the author explains how to understand C’s convoluted syntax so that you’ll be able to figure out that char* const *(*next)(); means "next is a pointer to a function returning a pointer to a read-only pointer to char".

Chapters 4, 9, and 10 clarify the difference between pointers and arrays and why you should know the difference. Once you finish these chapters, you’ll have a much better understand of how pointers work in C.

Chapters 5, 6, and 7 are the least interesting; they discuss linking, runtime data structures, and memory management for the Intel 80x86 family. There are still some useful nuggets in these chapters, though.

Chapter 8 contains hodge-podge of topics. One that I found interesting was a section on implementing a finite state machine in C. And the chapter ends with a section on obfuscated C code competitions, including the source code to two wonderful programs.

Chapter 11 is a throw-away chapter that begins by poking fun at C++, but then makes some effort at explaining what C++ is. This material is now somewhat dated.

The book is full of entertaining anecdotes, including the stories behind some famous bugs.

The Standard C Library
by P. J. Plauger
1992
Prentice-Hall
ISBN 0-13-131509-9

If you really want to understand the standard C library, read this book. The book serves as a reference to the standard C library and covers in detail all sections of the standard C library:

  1. assert.h
  2. ctype.h
  3. errno.h
  4. float.h
  5. limits.h
  6. locale.h
  7. math.h
  8. setjmp.h
  9. signal.h
  10. stdarg.h
  11. stddef.h
  12. stdio.h
  13. stdlib.h
  14. string.h
  15. time.h