Sams Teach Yourself C in 21 Days

(singke) #1

DAY 21


WEEK 3


Advanced Compiler Use


Today is the last day of your 21 days of C. At this time, you have actually
learned nearly all the key topics you need to know about programming with the
C language syntax. Today you will cover some additional features of C. Today
you will learn


  • Programming with multiple source-code files

  • Using the C preprocessor

  • Using command-line arguments


Programming with Multiple Source-Code Files ................................................


Until now, all your C programs have consisted of a single source-code file, (not
counting the header files, of course). A single source-code file is often all you
need, particularly for small programs, but you can also divide the source code
for a single program among two or more files, a practice called modular pro-
gramming. Why would you want to do this? The following sections explain.

33 448201x-CH21 8/13/02 11:16 AM Page 593

Free download pdf