This repository contains solutions to exercises from The C Programming Language by Kernighan and Ritchie. Code is organized by chapter, with each directory containing C implementations for that chapter's problems.
c1-tutorial– fundamentals, input/output, and basic string processingc2-types-operators-expressions– type systems and bitwise operationsc3-control-flows– loops, conditionals, and other control flow constructsc4-functions– functions, recursion, and simple utilitiesc5-pointers– pointers, arrays, and variable argumentsc6-structures– structures, unions, and related programsc7-io– file input/output and command-line tools
Each subdirectory contains standalone programs or small utilities that illustrate concepts from the corresponding chapter.
Most programs can be compiled with a C11-compatible compiler such as gcc:
gcc -std=c11 path/to/file.c -o program
./programSome subdirectories may include multiple source files that can be compiled together or with simple makefiles. Refer to comments within each directory for details.
This repository is intended for educational purposes. See individual files for specific license information where provided.