A

Admin • 833K Points
Coach

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: 24
  • Filed under category Ruby
  • Hashtags:

Explanation by: Admin

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.

Be the first to start discuss.