πŸ“Š JAVA
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];
}
  • (A) 0
  • (B) 1
  • (C) 2
  • (D) 3
πŸ’¬ Discuss
βœ… Correct Answer: (B) 1

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
577
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Chandrakant
Publisher
πŸ“ˆ
83%
Success Rate