Switch the array places in a loop

I suggest that you use the approach presented by @SomeOne perhaps this will make it clearer

Loop through length `a[]`. With each value of `i` you 
    add a value from `a[]` to the *next available* element in `c[]` 
    add a value from `b[]` to the *next available* element in `c[]` 

All you need is a variable to remember the next available element. Think about it, at the beginning the first available element is at [0], the net avialble is [1] and the one after that [2] and so on.

3 Likes