πŸ“Š Ruby
Q. What will be the output of the given ruby code?
Code:
arr = [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]
print arr
  • (A) [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]].
  • (B) [0, 0, 0, 0][0, 0, 0, 0]
  • (C) [0, 0, 0, 0]
  • (D) error
πŸ’¬ Discuss
βœ… Correct Answer: (A) [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]].

Explanation: Array inside array is declared and then printed.

Explanation by: Yami Thakur
Array inside array is declared and then printed.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
187
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Yami Thakur
Publisher
πŸ“ˆ
99%
Success Rate