How would I go about copying a set of array characters alternatively to a new array?
For example, I take "abcdef", split them and then copy them alternatively to a new array that would contain "adcedf".
I know how to copy them straight forward from 0 to 4 but
I need to do this with an array like this char word[9] = "abcdefgh"
I took half of them so I have "abcd" and "efgh" now I want to copy them alternatively to a new array
so I take the "a" from the first half, "e" from the second half and I get "ae"
then so I take the "b" from the first half, "f" from the second half and I get "bf"
so on and so forth until I get
"aebfcgdh"
I just need to know how am I able to copy them alternatively
The first element of the second array will be the first of the first. The second of the second will be the size/2'th element of the first. The third of the second will be the second of the first, etc.
That's a very easy pattern to translate into code!