Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kael89/k-and-r-solutions
Solutions to the problems in The C Programming Language by Brian Kernighan and Dennis Ritchie (K & R)
https://github.com/kael89/k-and-r-solutions
k-and-r
Last synced: about 2 months ago
JSON representation
Solutions to the problems in The C Programming Language by Brian Kernighan and Dennis Ritchie (K & R)
- Host: GitHub
- URL: https://github.com/kael89/k-and-r-solutions
- Owner: kael89
- Created: 2019-09-16T22:20:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-08T13:16:40.000Z (over 3 years ago)
- Last Synced: 2024-10-13T17:22:10.971Z (3 months ago)
- Topics: k-and-r
- Language: C
- Homepage:
- Size: 146 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# k-and-r-solutions
This repository features solutions to the exercises of the book [The C Programming Language](https://www.goodreads.com/book/show/515601.The_C_Programming_Language), by Brian W. Kernighan and Dennis M. Ritchie (**K & R**).
## Running the exercises
```bash
# 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` annotationInteractive 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](./img/single_exercise_results.JPG)- Multiple exercises result summary
![Multiple exercises result summary](./img/multiple_exercises_result_summary.JPG)**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