B. Playing Around with C Blackjack

Programming is not all work and no play, and the following Blackjack game proves it! The game provides a long example that you can study as you master C. Although the game has been kept extremely simple, a lot happens in this program.

As with all well-written programs, this one is commented thoroughly. In fact, if you have read each chapter of this book, you will understand the programming of Blackjack. One of the reasons the program is kept simple is to keep it compiler-independent. For example, there is no screen-clearing routine. The comments in the function named dispTitle() explain what you might want to do to add a fancier screen-clearing routine than the generic one provided. Also, you might want to ...

Get Absolute Beginner’s Guide to C, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.