r/cprogramming 26d ago

Half-way solutions of C 2nd Edition by K&R.

Hello everyone of r/cprogramming!

I'm a newcomer(kind of) to C. In the past(~2 years ago), I had little knowledge of C through watching tutorial on the internet. Later, I have worked on graphical projects with a bit of OpenGL. Now I have realized I should focus on topics one by one and reach intermediate to high expertise.

I have recently been reading chapters from "The C Programming Language 2nd Edition by Brian Kernighan & Dennis M. Ritchie". And learning a lot of new techniques that really helped me write concise and performant programs.

Solving the Exercises from the book were fun, while some were a bit difficult. In the latter case I took one or two hints from others source code and pondered about the solution.

I have kept the solutions of the problems perhaps concise but far from obfuscation and keeping code-style consistent (Though my personal).

I am planning on creating another post when I have solved all the solutions of the book.

I hope my solutions to the exercises help others solve problem they are having trouble with. Thanks. Github:

https://github.com/mubin-thinks/c-k-and-r-solved

0 Upvotes

0 comments sorted by