4
answers
0
watching
389
views
25 Sep 2018
18. Which choice below will cause all of the values stored in the array data to be printed out in reverse order? int[] data = {22, 17, 95, 16, 103, -14, 95}; // Choice A for (int i = data.length-1; i >= 0; i--) { print (data[i] + " "); // Choice B for (int i = 0; i < data.length; i++) { print (data[data.length-l-i] + " "); C. Both A and B will print all of the elements in reverse order. D. Neither A nor B will print all of the elements in reverse order
18. Which choice below will cause all of the values stored in the array data to be printed out in reverse order? int[] data = {22, 17, 95, 16, 103, -14, 95}; // Choice A for (int i = data.length-1; i >= 0; i--) { print (data[i] + " "); // Choice B for (int i = 0; i < data.length; i++) { print (data[data.length-l-i] + " "); C. Both A and B will print all of the elements in reverse order. D. Neither A nor B will print all of the elements in reverse order
29 Jun 2023
Already have an account? Log in
Collen VonLv2
26 Sep 2018
Already have an account? Log in