Sams Teach Yourself C in 21 Days

(singke) #1
day. If you want to check your answers, or if you’re stumped, the answers are provided
in Appendix F.
You won’t learn C by just reading this book, however. If you want to be a programmer,
you must write programs. Following each set of quiz questions is a set of exercises. We
recommend that you attempt each exercise. Writing C code is the best way to learn C.
We consider the BUG BUSTER exercises most beneficial. A bug is a program error in C.
BUG BUSTER exercises are code listings that contain common problems (bugs). It’s
your job to locate and fix these errors. If you have trouble busting the bugs, these
answers also are given in Appendix F.
As you progress through this book, some of the exercise answers tend to get long. Other
exercises have a multitude of answers. As a result, later days don’t always provide
answers for all the exercises.

Making a Better Book ............................................................................................

Nothing is perfect, but we do believe in striving for perfection. This is the sixth edition
ofSams Teach Yourself C in 21 Days. In preparing this edition, we have gone to even
greater lengths to make the code 100 percent compatible with a wider variety of C com-
pilers. This book has been checked several times to ensure an extremely high level of
technical accuracy. We have also incorporated the numerous corrections that have been
pointed out by the alert readers of the previous editions.

Introduction 3

The source code in this book has been compiled and tested on the following
platforms; DOS, Windows, Macintosh, UNIX, Linux, and OS/2. In addition,
readers of previous editions of this book have used the code on virtually
every platform that supports C!

Note


Another feature of this edition is the Type & Run sections. You’ll find six of these
throughout the book. Each Type & Run contains a short C program that does something
fun or useful while it illustrates C programming techniques. You can type these listings
in and run them. After you’ve entered them, you can also play with the code to see what
else you can make it do. The Type & Runs are for you to experiment with. We hope you
have fun playing with these additional code listings!

01 448201x-Intro 8/13/02 11:21 AM Page 3

Free download pdf