15 Passing Values between Functions

Chapter 16
Returning Function Values
You know how to pass variables to functions in only one direction a calling function passed data to a receiving function. You have yet to see how data is passed back from the receiving function to the calling function. When you pass variables by address, the data gets changed in both functions but this is different from passing data back. This chapter focuses on writing function return values that improve your programming power.
After you learn to pass and return values, you need to prototype the functions you write as well as C's built-in functions, such as printf() and scanf(). By prototyping your functions, you ensure the accuracy of passed and returned values.
This chapter teaches you the following topics:
Returning values from functions
Prototyping functions
Header files

 



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