Skip to content

Solutions to the problems in The C Programming Language by Brian Kernighan and Dennis Ritchie (K & R)

Notifications You must be signed in to change notification settings

kael89/k-and-r-solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k-and-r-solutions

This repository features solutions to the exercises of the book The C Programming Language, by Brian W. Kernighan and Dennis M. Ritchie (K & R).

Running the exercises

# All exercises
./run

# Exercises in a specific chapter
./run 1

# Specific exercise, eg 1-5
./run 1 5

Each exercise features a docblock at its top, featuring:

  • The @description of the exercise
  • For some exercises: an @interactive annotation

Interactive exercises will be skipped when running multiple exercises at once (eg all exercises in a chapter). Non-interactive exercises usually feature automated tests that check their correctness, for example:

  • Single exercise results
    Single exercise results

  • Multiple exercises result summary
    Multiple exercises result summary

Hint: for interactive exercises, press Ctrl + D to write EOF in the terminal. In K & R exercises, this is used as a signal that user input has finished.

List of not (yet) implemented exercises

  • 1-23
  • 1-24
  • 2-1
  • 4-5
  • 4-6
  • 4-7
  • 4-8
  • 4-9
  • 4-10
  • 4-11

About

Solutions to the problems in The C Programming Language by Brian Kernighan and Dennis Ritchie (K & R)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published