Back in the microcomputer days, hobbyists used the BASIC language to program their proto-PCs. BASIC is easy to learn, sloppy and forgiving. It also hints at some low-level language attributes, primarily with the PEEK and POKE commands.
Continue reading
Author Archives: dgookin
C Blog 5th Anniversary

Five years (plus eight days) ago, this blog went public with its first post. It was several months before the companion book, Beginning Programming with C For Dummies appeared, but I wanted the blog to be well-stocked with posts for those first, eager readers.
Continue reading
From String to Binary
A function that reads a string of 1s and 0s to generate an integer value output just screams to be called binput(). Yet, because my new version of the binbin() function (to display a binary value as a string) is called binString(), I decided to call its companion function stringBin(). Sorry to disappoint you.
Continue reading
Highlight a Chunk of Text – Solution
Your task for this month’s Exercise is to code a text-processing routine that interprets the ^ character as a toggle for all-caps output. This challenge can be difficult, depending on how you interpret the toggle.
Continue reading
From Binary to String
In my books, I use the binbin() function to display binary values. It’s a good way to demonstrate some of the C language’s low-level bitwise functions: The binbin() function lets you see the effect of bitwise operations at a binary level, all those ones and zeros.
Continue reading
Highlight a Chunk of Text
Most of the common data formats, such as CSV, XML, and JSON, use plain text to store complex data or somehow interpret that plain text as something it’s not. The programmer’s job is to translate the plain text and generate the proper type of complex data.
Continue reading
The Standard Error Device
Oh, I could have fun with the term “standard error device.” It could be any PCs running Windows 8. [rimshot] See? Tech humor! It’s nerdy, but that’s not the point of the standard error device with regards to C programming.
Continue reading
Reading File Dates
The process of opening, reading, writing, and closing files is basic C language stuff. For specific details about a file, the stat() function is used to fill a stat structure. Unfolded are the nitty-gritties about the file itself, such as its size, ownership, and up to four time-date stamps.
Continue reading
When There is No π
Reader Chris pointed out a fun and common C language inconsistency in last week’s Lesson: The constant M_PI isn’t always available. It’s not defined as part of the C standard, which means your compiler may lack this handy shortcut, located in the math.h header file. What to do, what to do?
Continue reading
π Day
Mathematic geeks of the world celebrate March 14 as “pi day.” The logic is that the date is 3/14, which are the first three digits of the value π, or 3.14159….∞
Continue reading