- #1
testme
- 68
- 0
If I have a program where I need to return an array, is it possible that I only return the array with the length of what was added to it?
What I mean is I have an array that gets filled up with letters but it doesn't always get completely filled up.
Is there a way I can only return the filled up part (including having only it's size)
Ex: array[4] = {?, ?, ?, ?, ?}
fills up to array[4] = {F, B, F, G,?}
and when I return it I only want an array like this
arr[3] = {F, B, F, G}
What I mean is I have an array that gets filled up with letters but it doesn't always get completely filled up.
Is there a way I can only return the filled up part (including having only it's size)
Ex: array[4] = {?, ?, ?, ?, ?}
fills up to array[4] = {F, B, F, G,?}
and when I return it I only want an array like this
arr[3] = {F, B, F, G}