V

Vinay Kumar • 8.55K Points
Tutor III

Q. What is the output of the given code?

Code:
my_string=Ruby
puts(my_string)
  • (A) Ruby
  • (B) Nil
  • (C) Error
  • (D) my_string
  • Correct Answer - Option(C)
  • Views: 103
  • Filed under category Ruby

Explanation by: Vinay Kumar
Ruby should be written in double quotes inorder to indicate a string.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics