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
Author Archives: dgookin
Of Course, ****d is a Variable
The unary * operator is used both to declare a pointer and access the value at that pointer’s location. When the value is the address of another pointer, two * unary operators are used. When the value is the address of an address of an address of an address, then four * unary operators are used. I kid you not.
Continue reading
How the ** Pointer Variable Works Best
The pointer-to-a-pointer variable does have a purpose, but fortunately it’s a very specific and rare purpose. And, no, that purpose isn’t to make you wish you had learned to program in Java.
Continue reading
The Ongoing Mystery of the ** Variable
The ** notation can really make a beginning C programmer blanch. In fact, a lot of Java programmers probably fled from the C language just after the initial lesson on pointers. They’d turn to stone even to glance at a variable like **blorf. You don’t need to cower under a desk with those people.
Continue reading
An Array of Pointers
Here’s a scary thing for most people: **blorf. No, not the name blorf, although it’s one of my favorite made-up words. What drives programmers insane — and all programmers, not just C programmers — are those double disaster asterisks.
Continue reading
The Month Program, Phase V
It’s all come to this: Gathering up the individual functions necessary to code a program that outputs the current month, formatted, with the proper number of days for February. Coincidentally, this post is published in February.
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
The Month Program, Phase IV
Last week’s Lesson demonstrates a pretty decent calendar program. It works for every month of the year that has 31 days. Obviously that’s not every month, so more fine tuning must be done, especially to deal with the variable number of days in February.
Continue reading
The Month Program, Phase III
With an algorithm that properly returns the first day of the month, the next step in creating a calendar is to display that first week, and then all subsequent weeks. Sounds easy, right?
Continue reading
The Month Program, Phase II
To create a calendar, you start with the first day of the month. Knowing which weekday is the first of the month is vital to your success.
Continue reading