Text Parsing Power

Parsing is an activity that programmers are often reluctant to do themselves. That’s because parsing can be a real pain in the rump. Not only that, but why write your own function when you can use specific libraries that handle the job for you? That’s a blessing, but it won’t let you escape from attempting this month’s Exercise.
Continue reading

Defensive Input

The task is rather simple: Prompt the user to input a value between 1 and 9. If you’ve read the first few chapters of any of my For Dummies C programming books, you could do that one easily. But what happens when the user doesn’t type a value in that range or — worse — they type text instead?
Continue reading