This repository contains my personal solutions and progress for the exercises found in the classic book, "The C Programming Language, Second Edition" by Brian W. Kernighan and Dennis M. Ritchie.
The purpose of this project is to practice and improve my skills in the C programming language. The book covers essential topics such as control structures, functions, pointers, structures, and file I/O, among others. The exercises are designed to help solidify understanding of these concepts and put them into practice.
https://github.com/sheredom/utest.h
The repository is organized as follows:
- Each chapter has its own directory (e.g.,
chapter1
,chapter2
, etc.). - Inside each chapter directory, you will find the solutions to the corresponding exercises, named as
exercise1_1.c
,exercise1_2.c
, etc., where the first number represents the chapter and the second number represents the exercise.
To compile and run a solution, navigate to the appropriate directory and use the following commands:
gcc -o exerciseX_Y exerciseX_Y.c
./exerciseX_Y
I also use make as a shorthand
make exerciseX_Y
./exerciseX_Y
When using text file as input for the program use the following command on windows powershell:
Get-Content exerciseX_Y.c | exerciseX_Y.exe
or this comand on UNIX systems:
./exerciseX_Y < exerciseX_Y.c
Replace X
and Y
with the respective chapter and exercise numbers.
As this repository serves as my personal journey through "The C Programming Language, Second Edition," I am not accepting contributions. However, feel free to fork the repository or use the solutions for your reference. Keep in mind that these solutions may not be perfect or optimal, as I am also learning along the way.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for more details.
This repository is not affiliated with or endorsed by the authors or publishers of "The C Programming Language, Second Edition."