Skip to content
/ kr2 Public

The C Programming Language 2nd ed. (K&R2): solutions, excerpts, explorations

License

Notifications You must be signed in to change notification settings

chrsw/kr2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About this repo

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.

Building

Build instructions are embedded in source files, sub-directories, chapter READMEs or Makefiles.

Standards

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.

Code

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.

Future

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

Contents

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

About

The C Programming Language 2nd ed. (K&R2): solutions, excerpts, explorations

Topics

Resources

License

Stars

Watchers

Forks

Languages