Recently I did a search and I found a really good resource for common C code. It's actually a book that was published in 1991. The best part about it is that it is free and completely online. They have done this because the book is no longer in print, and frankly it is outdated, but much of the code is still relevant. On this site you can download a PDF file of the book as well, but personally I just keep a link to the webpage handy.
Here is an excerpt from the Table of Contents page
This is the online version of The C Book, second edition by Mike Banahan, Declan Brady and Mark Doran, originally published by Addison Wesley in 1991. This version is made freely available.Here is a link to The C Book.
While this book is no longer in print, its content is still very relevant today. The C language is still popular, particularly for open source software and embedded programming. We hope this book will be useful, or at least interesting, to people who use C.