Often times the problems you’ll encounter in C involve interface with something else. You’ll need to code directions for an operating system or interact with data that already exists or is output from some function. In this month’s exercise, you get to test-run those skills.
Continue reading
Category Archives: Exercise
Show Me a Bar Chart
Computers are notorious for spewing out rows and columns of meaningless numbers. Sure, they have significance, but often your audience is more energized when they view something other than a dull table filled with values.
Continue reading
A Million Ways to Code in the West
Actually, it doesn’t matter west, east, north, or south, as multiple solutions exist for any programming puzzle.
Continue reading
One Word at a Time
A filter is a command line tool that takes input, modifies it, and generates output. This month’s Exercise is to create such a filter, one that takes text input and spews it out one word at a time.
Continue reading
Truncate Well That String
Nothing can be more disconcerting than text lopped off before the end of the li
Continue reading
A Simple Calculator
Of course computers can do math! Of course, programming has some math in it! Yet one reason that programmers are not necessarily geniuses at math is that it’s the computer that does the math, not the programmer. To prove that truth, why not code your very own calculator program?
Continue reading
The Multi-Dimensional Array Grid
Data is is just data. Organize that data and it becomes information. When it comes to organizing data in the C language, the first tool you probably learned was the array.
Continue reading
More Centering Challenges
Centering text is one of those basic things many programmer’s have to deal with. Yet once you write the function, you might forget about something I called bounds checking. After all, who would ever pass a string to a centering function where that string would be wider than the field in which it’s centered?
Continue reading
Center Yourself
It’s not the first thing you think of when you design output. No, it’s one of those afterthoughts, those numerous, “Hey, I could do this” moments that programmers experience time and again. In this case, the concept is centering a chunk of text.
Continue reading
Numbers With Commas
As a programmer, you’re used to seeing values like 1000 or 1234999. Your users aren’t. They prefer to see values presented as 1,000 or 1,234,999.01. Or, in Europe the format may look like this 1.000 or 1.234.999,01.
Continue reading