Skip to content
/ c Public

Exercises from the Kernighan and Ritchie book on C programming.

License

Notifications You must be signed in to change notification settings

foo74/c

Repository files navigation

My project to document all of the exercises in the K&R C Programming book. Oh, just for fun.

To compile with debugger and all warnings/errors:  gcc myprog.c Wall -g -o myprog

In general I try to include a Makefile in each area. So you should just be able to do:
make
make run
make clean


Note that to flush the stdin you have to press control-d twice if you have entered
some text. This is because pressing control-d once just flushes the stdin buffer.
When you press control-d twice it flushes the buffer and then the second one
sends EOF. You can test this by not typing anything into stdin and then press
control-d which will send EOF. Alternatively, you can type some text and then
hit the return key to flush the stdin buffer which also sends the '\n' character.
Then when you hit control-d it sends EOF because the stdin buffer is empty.

About

Exercises from the Kernighan and Ritchie book on C programming.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published