Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Question int[] style=”color:#000000;background-color:rgb(255,167,88);”>primes = { 2, 3, 5, 7, 11 }; Assume the array primes has been initialized . What does it contain after executing the following loop? for (int i = 0; i < 2; i++) { primes[4 – i] = primes[i]; } this is the answer of the book 2, 3, 5, 3, 2. Can someone please explain the process of thinking because my answer is 2,3,5 and I don't understand how we got the last two numbers.

Question

int[]  style=”color:#000000;background-color:rgb(255,167,88);”>primes = { 2, 3, 5, 7, 11 };Assume the array primes has been initialized . What does it contain after executing the following loop?for (int i = 0; i < 2; i++){  primes[4 – i] = primes[i];}
this is the answer of the book 2, 3, 5, 3, 2. Can someone please explain the process of thinking because my answer is 2,3,5 and I don’t understand how we got the last two numbers.

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"