I normally add them at the front, but there are other chunks of the system which add them at the end.

Google's style guide says inputs then outputs.  Other style guides say the opposite (e.g., memcpy).