 <blockquote> <p>I am led understand that when the function ends the pointer is lost, but will the array still be sent?</p> </blockquote> <p>The behavior is undefined. </p> <blockquote> <p>what is a good way to return this integer array with no arguments in the function call?</p> </blockquote> <pre><code>int nums[8]; </code></pre> <p><code>num</code> is local variable which resides on stack. You cannot return the reference of a local variable. Instead alloc <code>nums</code> with operator <code>new</code> and remember to <code>delete[]</code> it.</p> <pre><code>int* getNums() { int *nums = new int[8] ; // ..... return nums ; } // You should deallocate the resources nums acquired through delete[] later, // else memory leak prevails. </code></pre>