Your task for this month’s Exercise is to take a timestamp string and move values from inside a string (characters) into a structure. It’s not an easy exercise, and it doesn’t have a single, best solution.
Continue reading
Author Archives: dgookin
Deep Inside RAM
In last week’s Lesson, the Code::Blocks debugger helped examine the values of two variables, short int a and short int pointer p. Pointer p revealed a memory location inside the computer, which you can examine by using Code::Block’s Memory dump window.
Continue reading
Translating a Timestamp
A timestamp is one of those tricky chunks of data that’s not really a single value. Often it’s a clutch of integers or — worse — it’s a string. To do time calculations on the timestamp, you must translate it into a more useful form.
Continue reading
Peeking and Poking with Pointers
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
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