14 Variable Scope and Structuring Code

Chapter 15
Passing Values between Functions
C passes variables between functions using two different methods. The one you use depends on how you want the passed variables to be changed. This chapter explores these two methods. The concepts discussed here are not new to the C language. Other programming languages, such as Pascal, FORTRAN, and QBasic, pass parameters using similar techniques. A computer language must have the capability to pass information between functions, before it can be called truly structured.
This chapter teaches you the following topics:
Passing variables by value
Passing arrays by address
Passing nonarrays by address

 



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