A

Admin • 828.03K Points
Coach

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

Code:
digits = Array(0..9)
num = digits.at(6)
puts #{num}
  • (A) 5
  • (B) 6
  • (C) 7
  • (D) 8
  • Correct Answer - Option(B)
  • Views: 3
  • Filed under category Ruby
  • Hashtags:

Explanation by: Admin
This will produce the following result : 6

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.