the caller is the function that makes a call to another function. the other called function is the callee
the single return value can be used to return an error identifier after writing calculated result values to data via arguments
there is always only one error status but possible multiple calculated values
for example, acted-on arguments first, output arguments last
especially when the argument count can vary, it might make sense to put the output arguments first and others last
using globals might save declaration overhead, but access of a local is often faster because the compiler can better predict where it is modified and prepare to cache values
performance example
global
local
0m9.931s
0m9.940s
all stack allocations are being made at the beginning of a function anyway, regardless of where they are made, and having all declarations at the beginning groups this type of preparation, so it might make sense to have all declarations at the top. it's tedious to declare all variables before they are being used, but having it at the top might make it easier to find than scattered through the function
allocates and returns memory