MCQ Single Best Answer Not Set

QWhat is the value of a[1] after the following code is executed?
int[] a = {0, 2, 4, 1, 3};
for(int i = 0; i < a.length; i++)
      a[i] = a[(a[i] + 3) % a.length];

ID: #2148 Java Control Flow 1,183 views
Question Info
#2148Q ID
Not SetDifficulty
Java Control FlowTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • B 1
  • C 2
  • D 3
Correct Answer: Option B

Explanation

1

Share This Question

Challenge a friend or share with your study group.