Carey Brown wrote:Swap looks more like
At the end, v1 contains 5 and v2 contain 9.
Thanks!
So it's simply assignments happening here. What's on the left get's assigned to what's on the right, like that?
So we say that temp will hold on to the value that the array has at that specified index.
and then say that, that array index is to be assigned with the array index next to it? so even though they are both array[index] you can assign one to be WHERE it's at and the other to be the value?
so it's more like
array[0] = 5;
instead of array[0] = array[1]; ?
it confuses me to see an array assigned to another array, like what's even happening there. Is one array becoming another array? massive confusion about it.