-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
17 lines (13 loc) · 847 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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.