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

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