|
|
Functions Revisited |
|
Self contained unit of code that does "something"
Takes inputs, does its "something" and returns its output.
Functions can appear in any order in a file but a compiler must know of a function before it can be used.
All functions should/must be declared to return something. Use void if no value is actually returned.
return_type function_name ( arg1, arg2, ... ) { body }