 <p>Well, first of all, you can never return an array. You have two options, the more commonly used option is to create the array in main, and pass a pointer to it as one of your arguments (generally "output" arguments are the last one, but this obviously doesn't matter), or your other option, is to create the array in your function (it has to be <code>static</code> otherwise it will go out of scope once the function returns), and return a pointer to the array. Considering that this 'static' method isn't recommended, your second option could instead be <code>malloc()</code>ing space for the array in your function, and returning the pointer to that (don't forget to <code>free()</code> in main!).</p> <p>The video that @OleksandrKravchuk links to returns a pointer to a local variable, this is a bad idea (you can use the <code>static</code> trickery, but this is not a perfect solution either. 99% of time having it in as an argument is the way to do this). To be clear, there is <em>NO WAY</em> to return an array (by value, anyways). Don't let his answer confuse you.</p>