Y

Yami Thakur • 9.05K Points
Tutor III

Q. What will be the output of the given ruby code?

Code:
arr = [1, 2, 3, 4]
print arr
  • (A) [1, 2, 3, 4]
  • (B) 1234
  • (C) error
  • (D) Infinite Loop
  • Correct Answer - Option(A)
  • Views: 95
  • Filed under category Ruby

Explanation by: Yami Thakur
A variable arr is declared and [1, 2, 3, 4] is stored in that variable.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics