This repository contains solutions and exercises from "The C Programming Language" by Brian W. Kernighan and Dennis M. Ritchie (K&R).
The repository is organized as follows:
chapter1/- A Tutorial Introductionchapter2/- Types, Operators, and Expressionschapter3/- Control Flowchapter4/- Functions and Program Structurechapter5/- Pointers and Arrayschapter6/- Structureschapter7/- Input and Outputchapter8/- The UNIX System Interface
Each chapter directory contains:
- A README.md file describing the chapter's content
- Exercise directories (e.g.,
ex1-1/,ex1-2/, etc.) containing the solutions - Each exercise directory contains:
solution.c- The solution codeREADME.md- Description of the exercise
- Navigate to the chapter you're interested in
- Find the exercise you want to work on
- Each exercise directory contains both the problem description and solution
To compile any solution, use:
gcc solution.c -o solutionAfter compilation, run the program:
./solution