I think it means you're to put a value into the first empty element.
So you begin with an array in which you have put no values. It is size four, but you haven't put any values in it yet. It looks like this:
| x | x | x | x|
where x is an unknown value, because you haven't put anything in it yet. Then, you put the number 7 in. Now it looks like this:
| 7 | x | x | x|
Now, you put in the numbers 3, 5, and 1
| 7 | 3 | 5 | 1|
Now you want to put in the number 9. However, the array is full.
At any stage, if this function finds the array full it automatically doubles the size of array to accommodate this new value. |
So you have to double the size of the array, so it looks like this:
| 7 | 3 | 5 | 1| x | x | x | x|
You will have to do this by creating a new array of the new size, and copying into it all the numbers that were in the old array, and then delete the old array.
Now you have an array with eight elements; you can add the number 9:
| 7 | 3 | 5 | 1| 9 | x | x | x|
You will at all times need to keep track of how many elements you've put in (so you know where the next empty space is) and the size of the array (so you know when you need to make a new one, bigger).
Unfortunately, there is no way to look at an array and know if it is full or not, unless you use some kind of special value to mark the end of the array. An array does not know anything about itself, like its size. I can only imagine that you're expected to keep track of the size and how many you have written in main.