Y

Yami Thakur • 9.05K Points
Tutor III

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
  • Correct Answer - Option(A)
  • Views: 125
  • Filed under category Ruby

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics