Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2014-04-08 | Remove line_tolower() | zlg | 1 | -9/+0 | |
2014-04-08 | Solve Exercise 5-15: Case-insensitive sort | zlg | 2 | -1/+179 | |
2014-03-20 | Solve Exercise 5-14: reverse sort | zlg | 1 | -0/+152 | |
2013-10-18 | Solve Exercise 5-13: tail | zlg | 1 | -0/+106 | |
This exercise was somewhat irritating until I caved and used the code in section 5.6 like the exercise suggested. The solution is not what I think is clean, but given that [mc]*alloc haven't been covered yet, it's probably the best one can muster. Once I used the code in ยง5.6, the program fell into place. Still, it was a neat exercise. | |||||
2013-10-13 | Solve Exercise 5-12: flexible `detab` and `entab` | zlg | 2 | -0/+157 | |
2013-09-26 | Solve Exercise 5-11: `entab` and `detab` remixed! | zlg | 2 | -0/+137 | |
This one was pretty rough. At first I wanted to include a bunch of error-catching and "smart" stuff. When I took a second look at it and realized `itoa` returns 0 on a string, things became a bit easier. I may have been able to outsource a few things to a function or two, but overall I think it worked out. | |||||
2013-09-24 | Clean up 5-10's printf() calls | zlg | 1 | -4/+0 | |
2013-09-24 | Solve Exercise 5-10: expr | zlg | 1 | -0/+107 | |
2013-09-21 | Solve Exercise 5-9: day of year functions with pointers | zlg | 1 | -0/+74 | |
This exercise was fun and taught me a bit about initializing arrays and working with pointers. | |||||
2013-09-15 | Solve Exercise 5-8: Checking for errors | zlg | 1 | -0/+83 | |
2013-09-11 | Solve Exercise 5-7: Improved readlines() | zlg | 1 | -0/+106 | |
2013-09-08 | Solve Exercise 5-6: pointer-based functions | zlg | 1 | -0/+154 | |
This exercise was not very fun or interesting. While I somewhat enjoyed learning to use pointers, this was a bunch of busywork. It felt like homework, and that's terrible. It's the first exercise I've outright disliked. If you're writing a programming book, *don't* make exercises like this one! | |||||
2013-09-03 | Solve Exercise 5-5: strn{cpy|cat|cmp} | zlg | 1 | -0/+76 | |
This exercise seemed like it was designed to "pull it all together" with things learned in the previous few pages. Not much new in terms of techniques, but more a test to see how you could blend everything together. | |||||
2013-09-02 | Solve Exercise 5-4: strend() | zlg | 1 | -0/+37 | |
Detailed answers below the question will only occur now if I cannot explain myself well enough in code and nearby comments. I'm looking to learn how to write better comments so there's less need for prose. | |||||
2013-08-29 | Solve Exercise 5-3: pointer-powered strcat() | zlg | 1 | -0/+42 | |
2013-08-19 | Solve Exercise 5-2: getfloat() | zlg | 1 | -0/+75 | |
2013-08-13 | Solve Exercise 5-1: fixed getint() | zlg | 2 | -13/+82 | |
2013-08-08 | Solve Exercise 4-14: Swap Macro | zlg | 1 | -0/+30 | |
Thanks to ##c on Freenode for helping me understand what the text didn't clarify. | |||||
2013-07-23 | Correct Exercise 1-22's solution | zlg | 1 | -51/+64 | |
Tabs are now handled properly and the instructions are better followed. | |||||
2013-07-22 | Solve Exercise 4-13: Recursive reverse() | zlg | 1 | -0/+48 | |
2013-07-15 | Solve Exercise 4-12: Recursive itoa() | zlg | 1 | -0/+72 | |
2013-07-03 | Solve Exercise 4-11: getop() without ungetch() | zlg | 1 | -0/+263 | |
2013-06-27 | Solve Exercise 4-10: getline()-based calculator | zlg | 1 | -0/+276 | |
2013-06-26 | Solve Exercise 4-9: Pushed EOF and [un]getch() | zlg | 1 | -0/+284 | |
2013-06-24 | Solve Exercise 4-8: Single character buffer | zlg | 1 | -0/+281 | |
2013-06-22 | Solve Exercise 4-7: ungets() | zlg | 2 | -2/+278 | |
2013-06-21 | Solve Exercise 4-6: Variable support | zlg | 1 | -0/+272 | |
2013-06-19 | Solve Exercise 4-5: adding sin(), exp(), pow() | zlg | 1 | -0/+216 | |
2013-06-19 | Solve Exercise 4-4: Basic stack manipulation | zlg | 1 | -0/+201 | |
2013-06-18 | Solve Exercise 4-3: Add modulus to RPN calculator | zlg | 1 | -0/+147 | |
2013-05-08 | Solve Exercise 4-2: atof() enhanced | zlg | 1 | -0/+81 | |
2013-05-05 | Solve Exercise 4-1: strrindex() | zlg | 1 | -0/+87 | |
2013-04-23 | Add exercise descriptions and answers for ch1 | zlg | 13 | -51/+158 | |
* Corrected behavior in solutions for 1-9 and 1-23 | |||||
2013-04-23 | Solve Exercise 3-6: itoa (3 arg version) | zlg | 1 | -0/+67 | |
2013-04-20 | Solve Exercise 3-5: itob | zlg | 1 | -0/+85 | |
2013-04-19 | Solve Exercise 3-4: itoa improved | zlg | 1 | -0/+71 | |
2013-04-18 | Solve Exercise 3-3: expand() | zlg | 1 | -0/+82 | |
2013-04-16 | Solve Exercise 3-2: escape/unescape | zlg | 1 | -0/+68 | |
2013-04-16 | Solve Exercise 3-1: binsearch2 | zlg | 2 | -1/+72 | |
2013-04-06 | Solve Exercise 2-10: lower() | zlg | 2 | -1/+33 | |
Also added more information to 2-09's comments. | |||||
2013-04-06 | Solve Exercise 2-9: bitcount() | zlg | 1 | -0/+43 | |
2013-04-04 | Solve Exercise 2-8: rightrot() | zlg | 1 | -0/+52 | |
2013-04-03 | Solve Exercise 2-07: invert() | zlg | 1 | -0/+38 | |
2013-03-31 | Solve Exercise 2-6: setbits() | zlg | 1 | -0/+44 | |
2013-03-27 | Solve Exercise 2-5: The any() function | zlg | 1 | -0/+44 | |
2013-03-22 | Solve Exercise 2-04: Squeeze v2 | zlg | 1 | -0/+51 | |
2013-03-02 | Solve Exercise 2-3: Hex to integer converter | zlg | 1 | -0/+48 | |
This exercise was fun, and I learned a simpler way to convert them. | |||||
2013-02-28 | Change 2-02's solution to a while loop | zlg | 1 | -11/+7 | |
A recursive function is a bit much for something that simple. | |||||
2013-02-27 | Solve Exercise 2-02: No logical operators | zlg | 1 | -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-21 | Shorten 2-01's code | zlg | 1 | -22/+2 | |
There's no code like no code! :) |