Which is Greatest?

Difficulty: ★ ★ ★ ☆

One of the first functions many C programmers code is max(). It returns the largest of two values. Though this operation can also take place by using a simple if-else comparison, it’s a great way to teach how functions work and test various comparison operators. But this task isn’t the challenge for this month’s exercise.
Continue reading

Having Fun with goto

Difficulty: ★ ★ ★ ☆

Among the C language’s slender assortment of keywords you find goto. It’s a branching statement, which can be used to loop or to escape from some ugly programming knot. Regardless, you’re told early on in your C language education that you must avoid this keyword at all costs! That is, unless you want to try this month’s exercise.
Continue reading