The Seventh Line

Difficulty: ★ ★ ☆ ☆

For me, the scariest part of learning how to program a computer was file access. The problem was the horrid documentation. It introduced both sequential and random file access together without much explanation. So it was with much trepidation that I wrote my first file I/O program. That’s when I realized that the manual was stupid.
Continue reading

The swap() Function

Difficulty: ★ ★ ★ ☆

Swapping values is common task in computer programming, often used when sorting. You need the value of variable a in variable b and vice-versa. A number of methods are available for swapping, most of which involve using a temporary variable to hold one of the values during the swap.
Continue reading