The Book of C

This book is also available in PDF form.

_images/seaimg.jpg

New Harbor, Maine, USA. Photo by J. Sommers.

Preface

Get ready to learn one of the most influential programming languages ever developed. If you know some Java, you'll find C's syntax familiar (Java's syntax is based on C) and many of the same control structures. That familiarity can be deceptive, though. C is rather unforgiving and will allow you (nay, give you the weapon) to shoot yourself in the foot [1]. On the other hand, you'll develop a much better understanding of computer systems as your knowledge of C grows. Have fun, and good luck!

This book is loosely based on the "Essential C" document written by Nick Parlante at Stanford University. The original document is available at http://cslibrary.stanford.edu/101/. The Essential C document was last updated in 2003, which is one reason why this document exists. Programming languages and compilers change, and I wanted to take the good work that Nick had done and make several updates to modernize the text.

The notice reproduced below is copied from Essential C:

Stanford CS Education Library. This is document #101, Essential C, in the Stanford CS Education Library. This and other educational materials are available for free at http://cslibrary.stanford.edu/. This article is free to be used, reproduced, excerpted, retransmitted, or sold so long as this notice is clearly reproduced at its beginning.

Contents:

Thanks

Thanks to my COSC 301 students from Fall 2015 and 2016 for test-driving this text and for providing useful feedback. Thanks also to Aaron Gember-Jacobson, Chris Nevison, and Yasoob Khalid for pointing out various typos (and in Yasoob's case, the pull requests).

If you find any errors or typos in the book, or wish to make a suggestion for improvement, please file a bug report and/or make a pull request at https://github.com/jsommers/cbook/issues.

Indices and tables