To Zero and Back

Many first-time programmers rush over variable type descriptions and head full-bore into coding. That’s fine. I did it. You probably did it. But eventually you encounter code that doesn’t work properly because of negative numbers. That’s when you go back and review the concept of negative integer variable types.
Continue reading

Tally the Digits

The programming adventure is full of interesting twists and turns, and with each new puzzle comes multiple opportunities to flex your coding skills and devise new solutions. For this month’s Exercise, the task is to take an integer value and add up all its digits. The mathematical term for this operation is a digit sum.
Continue reading

The pow()erful Function

When I first learned the C language, I was surprised to find something missing from its assortment of operators. The +, -, *, and / operators are pretty common for nearly all programming languages. And you’ll find the % and ! operators used for modulus and logical NOT in a few programming languages. Yet what other languages have that C lacks is an exponent or power operator.
Continue reading