The output you are seeing is the value that gets shuffled/swapped/moved because you have it inside the for loop. Try printing out each item of the array outside the loop. Either with another loop or...