
You can draw a blank and you can get spaced out, so there’s a difference in the English language between the words “space” and “blank.” This difference doesn’t explain how the ctype functions isblank() and isspace() work. In this Lesson, I cover these two functions and their differences, as I continue my exploration of the ctype functions.
Continue reading
That Series That Has No Name but Equals 5e
Difficulty: ★ ★ ☆ ☆
I’d like to know when mathematicians arrive at their “a-hah!” moments. Do they just have an equation pop into their head and mutter, “Golly, I wonder what that means?” Or do they wake up screaming in the middle of the night? Personally, I can well connect with the latter.
Continue reading
Ctype Functions: isgraph() and isprint()

Two very similar ctype functions are isgraph() and isprint(). Only one character separates the two functions. And the isgraph() function has nothing to do with graphics. These are the topics for this week’s Lesson as I continue my exploration of the ctype functions.
Continue reading
Ctype Functions: isalnum(), isalpha() and isdigit()

The ctype functions isalnum(), isalpha(), and isdigit() examine the alphanumeric ASCII characters. Each of these functions are related, so I cover them together in this post that continues my exploration of the ctype functions.
Continue reading
Ctype Functions: isupper() and islower()

I wouldn’t say that the isupper() and islower() functions are the opposite of the toupper() and tolower() functions, though they do play well together. This week I continue my exploration of the ctype functions.
Continue reading
Ctype Functions: toupper() and tolower()

The easiest way to mess with characters in C is to employ the ctype functions. I name this category of library functions after the ctype.h header file that defines them. Some are true functions, some are macros. Each function can be replicated with standard C code, though it’s quicker to use an established function than to code your own. But that’s not the point of learning to program!
Continue reading
Pointers to Multi-Dimension Arrays – Solution
The challenge for this month’s Exercise is to use pointers to work through a multi-dimensional array. As I mentioned in the exercise post, multi-dimensional arrays are all stored as a single-dimension where the compiler calculates offsets for rows and columns (and more) for you.
Continue reading
The Ctype Functions

Any C programmer eager to mess with characters or strings knows about the handy ctype functions. I use this name because these functions, which include a few macros, are defined in the ctype.h header file. Their job is to manipulate and examine characters.
Continue reading
Pointers to Multi-Dimension Arrays
Difficulty: ★ ★ ★ ☆
I received a question via email regarding my recently-published book, Dan Gookin’s Guide to C Language Pointers (available at Amazon!). The question: How to use a pointer to navigate a multi-dimension array? While I do cover pointers to an array of strings (which is kinda what the reader wanted), I don’t specifically cover pointers and multi-dimensional arrays. Therefore, I created this month’s exercise to tackle the task.
Continue reading
Obtaining the Averages

The point of extracting data chunks from a grid is to obtain the average of their values. This approach is how I reduce the massive amount of data stored in an image for representation as ASCII text. (See the thumbnail above.)
Continue reading