Difficulty: ★ ★ ☆ ☆
The only aspect of math I enjoyed in school was geometry. Trigonometry was a close second. I found the study fascinating and did well; I received a B in that class as opposed by my usual C- or D.
Continue reading
The only aspect of math I enjoyed in school was geometry. Trigonometry was a close second. I found the study fascinating and did well; I received a B in that class as opposed by my usual C- or D.
Continue reading
The C language has string manipulation functions, but they’re tepid. In fact, the C23 update includes even more functions to duplicate strings and to stick them together. These actions are simple in other languages, but create such a problem for C that coding a string copying function is often a skill you must demonstrate when applying for a C programming job.
Continue reading
You’ve crafted a brilliant function, ensuring that it properly processes words and generates needed output. Is the code perfect? Well, it looks perfect. But how do you know for certain?
Continue reading
I’ll be blunt: If you want to pass an array to a function, or have a function return an array, just give up now and use pointers. It’s a far easier operation, and it would save me the bother of having to write this post to further discuss the topic of array decay.
Continue reading
The task for this month’s C programming Exercise is to code a filter that reverses single words. As a filter, the code deals with standard input and output, but it must store this input in word-sized chunks for the reversing process to work.
Continue reading
Array decay has nothing to do with too much sugar in your code or poor brushing habits. No, it’s a hot topic in C programming, and a source of confusion.
Continue reading
A few months back, this blog’s monthly Exercise was to write a filter to reverse all text input. No matter how much text floated in, the filter gobbled it all up and spewed it back in reverse order. This month’s challenge is similar, but on a smaller scale.
Continue reading
Let me be blunt: If you haven’t yet seen an undefined reference error, you truly aren’t a C programmer. In fact, the more of these messages you see, the longer you’ve been coding in C. Undefined reference errors are a badge of honor.
Continue reading
It’s time to free yourself from the math-nerd aspect of the exp() function and put it to legitimate use by animating an asterisk bouncing across the screen. Such a feat may be considered unusual for a stream-oriented programming language like C, but I find animation more interesting than math.
Continue reading
Text mode graphics were a Big Deal with computers for the longest time. C’s stream I/O didn’t stop various computer games from being developed throughout the 1970s and 1980s. And this limitation isn’t going to stop me from animating a falling ball, er, asterisk.
Continue reading