Functions not only
break up your code into a more organized program, but
they can also save time if you need to reuse code often. A function can be
called as many times as needed throughout a program; not having to retype the
body of the function every time you want to use it saves time and reduces
errors.
A void function will end automatically when it reaches its last line. The
return; command can be used to make a void function exit before its last
line.
A static variable is only visible inside of the function in which it is defined,
although the function will "remember" the value of the static variable for the
next time it is called.
A function should be made inline when it is only a few of lines long, and the
price of the improved speed of your program outweighs the cost of extra memory.
(If you don't understand what that means then just don't use inline and the
compiler will make the decision for you).