Sams Teach Yourself C in 21 Days

(singke) #1

TYPE& RUN 1 Printing Your Listings


Throughout this book you will find a number of Type & Run sections. These
sections present a listing that is a little longer than the listings within the chap-
ters. The purpose of these listings is to give you a program to type in and run.
The listings might contain elements not yet explained in the book.
These programs will generally do something either fun or practical. For
instance, the program included here is called print_it. In addition to printing the
source code, print_it adds line numbers just like those included in this book.
This program can be used to print your listings as you work through the rest of
this book.
We suggest that after you type in and run these programs, you take the time to
experiment with the code. Make changes, recompile, and then rerun the pro-
grams. See what happens. There won’t be explanations on how the code works,
only what it does. Don’t fret, though. By the time you complete this book, you
should understand everything within these earlier listings. In the meantime, you
will have had the chance to enter and run some listings that are a little more fun
or practical!

04 448201x-T&R1 8/13/02 11:20 AM Page 25

Free download pdf