Code for The C Programming Language 2nd Ed. (K&R2) Kernighan & Ritchie, 1988, Prentice Hall
This repo contains exercises, original solutions, code snippets, examples, thoughts, etc. related to K&R2. The excerpts are left as close as possible to the text while still building on a real modern system.
Build instructions are embedded in source files, sub-directories, chapter READMEs or Makefiles.
Most code uses Standard C 89 like the text, Standard C Library (default GCC and GNU Lib C on Ubuntu 20.04), with no other dependencies. Some code might use GNU C extensions and should be noted.
This code isn't designed to be completely correct in all cases, only meant to fulfill the spirit of the exercise. With few exceptions, safety and portability are not a consideration. That is, these code snippets are mainly for pedagogical purposes, not for production or expert reference.
The plan is to eventually add more helpful comments and test code.
Rebuild the Vim spelling file in Vim with: :mkspell! extras/kr2.utf-8.add
ch1-ch8 code, mostly solutions, split into chapters README.md this Markdown file LICENSE specify license for files in this repo INSTALL how to use the files in this repo TODO ideas and next planned next steps extras miscellaneous files used by project and exercises