
Today is Independence Day in the USA. Two hundred and fifty years ago, this nation’s founding fathers signed the Declaration of Independence. While I’ve had posts dated July 4 previously on this blog, today is a special anniversary. It necessitates a specific C language program.
Continue reading
Author Archives: dgookin
It’s All Greek!
Difficulty: ★ ★ ☆ ☆
My recent ctype series got me thinking: What about coding a specific function that works with a non-Latin alphabet? The first alphabet I thought of was Greek. Why not check out the Unicode values of Greek and see whether you can code a few ctype functions that deal with this character set?
Continue reading
Ctype Function: isxdigit()

The ctype isxdigit() function returns TRUE for any digit you find in a hexadecimal number. I suppose this function has a role to play, most likely in detecting hexadecimal characters in a string. Regardless, this post wraps up my exploration of the ctype functions.
Continue reading
Ctype Function: ispunct()

For the ctype ispunct() function, the goal is to understand that “punct” is short for punctuation and not puncture. To put this function to use you need to know what the library considers to be an ASCII punctuation character. It’s yet another step forward in my ongoing exploration of the ctype functions.
Continue reading
Ctype Functions: isascii() and iscntrl()

I almost believe these two functions to be useless, but they do play an important role in the ctype pantheon: isascii() determines whether an integer value is an ASCII character, and iscntrl() lets the program know further whether an integer value is also an ASCII control code. This pair adds to my continuing exploration of the ctype functions.
Continue reading
That Series That Lacks a Name but Equals 5e – Solution
Once again, I dive into the murky waters of mathematics for this month’s Exercise. The challenge is to code the Series That Has No Name (STHNN), which converges on the value 5e.
Continue reading
Ctype Functions: isblank() and isspace()

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