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
β
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.