πŸ“Š JAVA
Q. What will be the content of array variable table after executing the following code?

for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
if (j == i) {
table[i][j] = 1;
} else {
table[i][j] = 0;
}
}
}
  • (A) 0 0 0 0 0 0 0 0 0.
  • (B) 1 0 0 1 1 0 1 1 1.
  • (C) 1 0 0 0 1 0 0 0 1.
  • (D) 0 0 1 0 1 0 1 0 0.
πŸ’¬ Discuss
βœ… Correct Answer: (C) 1 0 0 0 1 0 0 0 1.

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
174
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
91%
Success Rate