Pattern Manipulation

You see them all the time, mostly as “busy” gizmos. They are animations that spin or dance to deceive you into believing that the software is really doing something. But they’re merely animations. In fact, they’re very simple animations that require practically effortless coding.
Continue reading

Fetching the Current Path

The C library hosts many file and directory management functions. They’re all pretty standard, no matter which operating system you use. What isn’t standard, however, is the size of a pathname. That value plays an important role if you’re to properly allocate memory to store directory information.
Continue reading

What is True?

It happens so often, I’m curious as to why the C language standard I/O header file doesn’t define TRUE and FALSE. Then again, what is TRUE and FALSE to a programming language — or to a computer? Why is this value true and that value false in the first place?
Continue reading

Averaging an Array of Unknown Size

Imagine you’re working with an array that has room to store thousands of integer values. You’ve been hired to craft a function that averages those values, but you don’t really know how many values are stored in the array. The guy who gave you the assignment (me), simply said that the array is capped with a zero value.
Continue reading