When Alexander faced the challenge of untangling the Gordian Knot, he just sliced it with his sword. Brilliant. Alas, untangling obfuscated C code takes more than a swift swipe of a blade.
Continue reading
Category Archives: Lesson
Silicon Valley Encryption, Part I
I’m a fan of the HBO Series, Silicon Valley. From creator Mike Judge, it excellently showcases the antics of the nerds who populate California’s Silicon Valley and the companies they work for. It’s a brilliant series that I highly recommend to my techy friends. Plus, it’s chock full of digitally delightful easter eggs.
Continue reading
A Nutty Non-Loop – Solution
The insane challenge for this month’s Exercise is to generate a countdown loop without using any looping functions. And, no, you can’t just use a buncha printf() statements to output the values.
Continue reading
The Phone Number Value
As a string, a phone number is easy to parse, left-to-right, as shown in last week’s Lesson. As a value, however, the processing requires mathematical manipulation to work it from left-to-right.
Continue reading
The Phone Number String
This Lesson’s topic is more about database programming than C programming, but the philosophy still applies. When do you store a number as a value as opposed to storing it as a string? Two famous examples are zip codes and phone numbers.
Continue reading
To Prefix or Postfix
Being curious, I asked ChatGPT which C programming questions it gets asked most frequently. Some of the topics are complex, such as back peddling through a linked list. I cover double-linked lists on this blog, though I don’t demonstrate how to work backwards through one.
Continue reading
A Problem with Strings in Two-Dimensional Arrays
Declaring an array of strings as a pointer has many advantages, as demonstrated in last week’s Lesson. Above all, I like that I don’t have to calculate the longest string’s length to set the size for the second dimension. But what happens when set this size incorrectly?
Continue reading
Rotating an Array of Strings
Last month, I posted about rotating values in an array. This post used integers, but the question has come to me about doing the same thing with an array of strings. Yes, it’s possible — and just as easy.
Continue reading
Flipping the Data
Just as it’s possible to rotate elements in an array, shuffling them all up a notch and moving the first element to the end, it’s also possible to flip an array, reversing the order of its elements.
Continue reading
Rotating the Data
You wait all day in line — you know, one of those bureaucratic government things — only to get to the front of the line and discover that you’re missing something. So back to the end of the line you go, ready to toil all over again. Sound familiar? But a computer wouldn’t care.
Continue reading