The C language defines a function as an object. This allows the same syntax to be used for a function declaration, and also allows a pointer to point at a function. A function is a piece of code performing a transformation.
It receives information by its arguments, it transforms these input and the global information, and then produces a result, either by returning a value, or by updating some global variables. To help the
function in its work, it is allowed to have local variables which are accessed only by that function and exist only when the function is active. Arguments and local variables will generally be allocated on the
stack to allow recursivity. For some very small microprocessors, the stack is not easily addressable and the compiler will not use the processor stack. It will either simulate a stack in memory if the application
needs to use recursivity, or will allocate these variables once for ever at link time, reducing the entry/exit time and code load of each function, but stopping any usage of recursivity.
When a function call is executed the arguments are copied onto the stack before the function is called. After the call, the return value is copied to its destination and the arguments are removed from the stack. An argument or a return value may be any of the C data objects. Objects are copied, with the exception of arrays, whose address is copied and not the full content. So passing an array as argument will only move a pointer, but passing a structure as argument will cop