13 Introduction to C Functions

Chapter 14
Variable Scope
Variable scope is most important when you write functions. Variable scope determines which functions recognize certain variables. If a function recognizes a variable, the variable is visible to that function. Variable scope protects variables in one function from other functions that might overwrite them. If a function doesn't need access to a variable, that function shouldn't be able to see or change the variable. In other words, the variable should not even be ''visible" to that particular function.
This chapter teaches you the following topics:
Global and local variables
Passing arguments
Automatic and static variables
Passing parameters

 



C by Example
C by Example
ISBN: 0789722399
EAN: 2147483647
Year: 1999
Pages: 43
Authors: Greg Perry

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net