aboutsummaryrefslogtreecommitdiff
path: root/ch2 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-03-27Solve Exercise 2-5: The any() functionzlg1-0/+44
2013-03-22Solve Exercise 2-04: Squeeze v2zlg1-0/+51
2013-03-02Solve Exercise 2-3: Hex to integer converterzlg1-0/+48
This exercise was fun, and I learned a simpler way to convert them.
2013-02-28Change 2-02's solution to a while loopzlg1-11/+7
A recursive function is a bit much for something that simple.
2013-02-27Solve Exercise 2-02: No logical operatorszlg1-0/+44
The text doesn't specify which technique to use. The section outlined operator precedence, but I couldn't think of a way to check for truth in the three main expressions without logical operators. So I turned to a recursive function. It works, but I'm not sure if it's what K&R were after.
2013-02-21Shorten 2-01's codezlg1-22/+2
There's no code like no code! :)
2013-02-21Correct 2-01 solutionzlg1-4/+14
FLT_MIN and DBL_MIN refer to the lowest _positive number_ representable in floating-point form on the machine, not the lowest _negative number_. Subtracting FLT_MAX from 0 will give you the minimum.
2013-02-21Solve Exercise 2-01: Variable limitszlg1-0/+142
Fixed gitignore list, too