Skip to main content

All Questions

Tagged with
2 votes
3 answers
3k views

Return array pointers vs. populating an array inserted as a parameter?

Which is better? I noticed the latter is used in a lot of C code. People will typically malloc an array, and then pass that as a parameter to a function, which will then populate it. Whereas in Java, ...
user3724404's user avatar