Two Dimensional Arrays are a Myth

Do C language pointers frighten you? Good! They’re supposed to, mostly because few instructors bother explaining them well, but also because of the nomenclature: “Pointers point.” Regardless, if you shun pointers, as many C programmers do, you can fall back on array notation. It’s a useful alternative and a handy shortcut, but it’s completely bogus.
Continue reading

Look at the sizeof That Thing

A structure is a multi-variable, containing several variable types, all members of the same unit. Two declarations are required for a structure: The structure itself and the variable. Programmers get into trouble with structures when determining the variable’s size, using typedef as a structure shortcut, and when declaring structure pointers.
Continue reading

The strftime() Function

Being a C nerd, I occasionally browse the C library to discover new functions. Such an exercise is a must, not just for C but for any programming language. That’s because programmers can become complacent and rely upon the same old tricks. Only by reviewing the libraries, or by looking at other programmers’ code, can you learn new things.
Continue reading