aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-09-11Solve Exercise 5-7: Improved readlines()zlg1-0/+106
2013-09-08Solve Exercise 5-6: pointer-based functionszlg1-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-03Solve Exercise 5-5: strn{cpy|cat|cmp}zlg1-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-02Solve Exercise 5-4: strend()zlg1-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-29Solve Exercise 5-3: pointer-powered strcat()zlg1-0/+42
2013-08-19Solve Exercise 5-2: getfloat()zlg1-0/+75
2013-08-13Solve Exercise 5-1: fixed getint()zlg2-13/+82
2013-08-08Solve Exercise 4-14: Swap Macrozlg1-0/+30
Thanks to ##c on Freenode for helping me understand what the text didn't clarify.
2013-07-23Correct Exercise 1-22's solutionzlg1-51/+64
Tabs are now handled properly and the instructions are better followed.
2013-07-22Solve Exercise 4-13: Recursive reverse()zlg1-0/+48
2013-07-15Solve Exercise 4-12: Recursive itoa()zlg1-0/+72
2013-07-03Solve Exercise 4-11: getop() without ungetch()zlg1-0/+263
2013-06-27Solve Exercise 4-10: getline()-based calculatorzlg1-0/+276
2013-06-26Solve Exercise 4-9: Pushed EOF and [un]getch()zlg1-0/+284
2013-06-24Solve Exercise 4-8: Single character bufferzlg1-0/+281
2013-06-22Solve Exercise 4-7: ungets()zlg2-2/+278
2013-06-21Solve Exercise 4-6: Variable supportzlg1-0/+272
2013-06-19Solve Exercise 4-5: adding sin(), exp(), pow()zlg1-0/+216
2013-06-19Solve Exercise 4-4: Basic stack manipulationzlg1-0/+201
2013-06-18Solve Exercise 4-3: Add modulus to RPN calculatorzlg1-0/+147
2013-05-08Solve Exercise 4-2: atof() enhancedzlg1-0/+81
2013-05-05Solve Exercise 4-1: strrindex()zlg1-0/+87
2013-04-23Add exercise descriptions and answers for ch1zlg13-51/+158
* Corrected behavior in solutions for 1-9 and 1-23
2013-04-23Solve Exercise 3-6: itoa (3 arg version)zlg1-0/+67
2013-04-20Solve Exercise 3-5: itobzlg1-0/+85
2013-04-19Solve Exercise 3-4: itoa improvedzlg1-0/+71
2013-04-18Solve Exercise 3-3: expand()zlg1-0/+82
2013-04-16Solve Exercise 3-2: escape/unescapezlg1-0/+68
2013-04-16Solve Exercise 3-1: binsearch2zlg2-1/+72
2013-04-06Solve Exercise 2-10: lower()zlg2-1/+33
Also added more information to 2-09's comments.
2013-04-06Solve Exercise 2-9: bitcount()zlg1-0/+43
2013-04-04Solve Exercise 2-8: rightrot()zlg1-0/+52
2013-04-03Solve Exercise 2-07: invert()zlg1-0/+38
2013-03-31Solve Exercise 2-6: setbits()zlg1-0/+44
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 limitszlg2-0/+143
Fixed gitignore list, too
2013-02-13Add license file, reorganize projectzlg26-0/+15
2013-02-13Fix 1-09's solutionzlg1-2/+4
My initial solution tried to simplify the conditions for outputting a space. You really do need two 'if's in there.
2013-02-08Fix Exercise 1-12's solutionzlg1-2/+4
Printing a newline for each whitespace character was the wrong behavior.
2013-02-07Solve Exercises 1-1 to 1-12zlg12-0/+307
It was bugging me and the exercises are simple, so I pumped'em out.
2013-02-06Fix style issue and correct 1-24zlg1-4/+4
Escape sequences were being compared with the 'or' operator instead of the 'and' operator. If I had left it alone, every escape sequence would've borked it.
2013-02-06Solve Exercise 1-24: C syntax checkerzlg1-110/+122
I'm glad to be done with chapter 1. It feels like I'm starting to gain momentum. I'm certainly looking forward to using higher level constructs like switch(), which I think is available in Chapter 2. So far so good!
2013-02-06First crack at 1-24zlg1-0/+151
Committing before I try something different.
2013-01-29Solve exercise 1-23: Remove C commentszlg2-15/+99