posted 15 years ago
At start your array contains {1,2,3,4,5,6,7,8};
First time thru the first loop i will be 1, so it sets the second element of your array (arrays are zero based) to 0, so your array contains {1,0,3,4,5,6,7,8}
Second time thru the first loop i will be 0, so it sets the first element of your array to 0, so your array contains {0,0,3,4,5,6,7,8}
Third time thru the first loop i will be 3, so it sets the fourth element of your array to 0, so your array contains {0,0,3,0,5,6,7,8}
Fourth time thru the first loop i will be 0, so it sets the first element of your array to 0, so your array contains {0,0,3,0,5,6,7,8}
Fifth time thru the first loop i will be 5, so it sets the sixth element of your array to 0, so your array contains {0,0,3,0,5,0,7,8}
Sixth time thru the first loop i will be 0, so it sets the first element of your array to 0, so your array contains {0,0,3,0,5,0,7,8}
Seventh time thru the first loop i will be 7, so it sets the eighth element of your array to 0, so your array contains {0,0,3,0,5,0,7,0}
Eigth time thru the first loop i will be 0, so it sets the first element of your array to 0, so your array contains {0,0,3,0,5,0,7,0}