32. Returning Data from Your Functions
In This Chapter
• Using the
return data type
This chapter isn’t the end of your C learning—it’s only the beginning. Sounds deep, doesn’t it? This chapter completes the multiple-function picture by showing you how to return values from the called function to the calling function. It also explains function prototypes.
The bottom line is this: You will now understand why most programs in this book contain this line:
You also will understand the true purpose of header files.
So far, you’ve seen how to send variables to functions. You’re now ready to learn how to return a value. When a function is to return a value, use the
return statement to return the value. ...