Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork140
Solutions to the exercises in the book "The C Programming Language" (2nd edition) by Brian W. Kernighan and Dennis M. Ritchie. This book is also referred to as K&R.
License
ohkimur/the-c-programming-language-2nd-edition-solutions
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Solutions to exercises fromThe C Programming Language (2nd Edition) by Brian W. Kernighan and Dennis M. Ritchie, commonly known asK&R.
You need a C compiler:
macOS:
xcode-select --install
Ubuntu / Debian:
sudo apt-get update&& sudo apt-get install build-essentialWindows:UseWSL (recommended) orMinGW.
Build all exercises:
make
Build a specific exercise:
cd chapter_1/exercise_1_01make hello_world./hello_worldClean up:
make clean
chapter_N/ exercise_N_XX/ solution.c # Solution source code file_in.txt # Input file (if needed) file_out.txt # Output file (if needed)Contributions are welcome! SeeCONTRIBUTING.md for guidelines.
Quick start:
make format# Format your codemake check# Run all checks before submitting
The C Programming Language is a classic programming book. The exercises are designed so that you can solve them with the knowledge acquired up to that point in the book.
These solutions are meant to help those learning C. If you're working through the book, try solving the exercises yourself first!
- Editor: Any text editor works.VS Code with theC/C++ extension is recommended.
- Debugger:LLDB (macOS) orGDB (Linux)
- Formatter:clang-format
This project is open source. Feel free to use these solutions for learning!
About
Solutions to the exercises in the book "The C Programming Language" (2nd edition) by Brian W. Kernighan and Dennis M. Ritchie. This book is also referred to as K&R.
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.