I had a reader offer me a puzzle the other day. His code ran well without the #include
directive and he wondered why. I did, too.
Continue reading
Author Archives: dgookin
Numbers Complex and Imaginary
Your C programs aren’t meant to suffer with an inability to handle values such as the square root of -1, the imaginary number i. No, you can easily manage such mathematical mysteries, making rare the possibility of a -nan
result, as shown in last week’s Lesson.
Continue reading
Formatting a Series for Output – Solution
The challenge for this month’s Exercise is to output a series of numbers, 1 through 10, and to ensure that the final number doesn’t look dorky. I’m certain that’s what I asked for.
Continue reading
The sqrt(-1.0)
The four-letter word that made me avoid computers and programming for far too long is math.
Continue reading
Formatting a Series for Output
Difficulty: ★ ★ ☆ ☆
Here is an issue that crops up often in programming, specifically when outputting data in a series: How do you separate items in the series and not make the last item look dorky? It’s tricky.
Continue reading
Silicon Valley Encryption, Part III
My attempt to de-obfuscate the easter egg from the HBO series Silicon Valley didn’t help in my efforts to reverse engineer the code. I got close, but I just can’t obtain that first (or final) value.
Continue reading
Silicon Valley Encryption, Part II
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
C Blog 12th Anniversary
Twelve years ago today, this blog had its first post. It’s been run consistently since, with new Lessons posted every Saturday and a new Exercise posted on the first of each month.
Continue reading
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