CISC 220 Lecture Notes - Lecture 21: C Preprocessor, Global Variable
Document Summary
Week 6 class 3 - intro to c (continued) Check website for office hours: don"t e-mail. Declaration = header only, sometimes called the forward declaration . Doesn"t specify how it works but is enough for the c compiler to know what to do with it. This does not affect the performance of the program. **important to understand this, especially since we will be writing big programs that may need to be broken down into several files . Global variables are defined outside any functions and must be declared before use. Use them with caution, since they can make a program much less readable. Examples: modifying the smallfuncs. c program to use global variables (technically global constants) What we usually refer to as c is really two languages rolled into 1: the c preprocessor, and the c language source code pre-processor spits out something that looks like c (modified source code)