Programming style: use return value of function ? or pass pointer as an argument ? (assuming that there is only one output)

Both should work in terms of functionality, but suppose that it is used very heavily. And also in terms of reliability or security perspective, could anyone give insight to this question ?

Thank you

PS. In case function returns a value, where is that value stored in the stack ?
Will that be overwritten when other variables are written to that original place ?