A
Q. Find the value of A[1] after execution of the following program.
Code:
int[] A = {0,2,4,1,3};
for(int i = 0; i < a.length; i++){
a[i] = a[(a[i] + 3) % a.length];
}
for(int i = 0; i < a.length; i++){
a[i] = a[(a[i] + 3) % a.length];
}
- Correct Answer - Option(B)
- Views: 24
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.