What is the output of the given code?
my_string=Ruby
puts(my_string)
my_string=Ruby
puts(my_string)A. Ruby
B. Nil
C. Error
D. None of the mentioned
Answer: Option C
Related Questions on Basic Syntax in Ruby
What does the 'puts' method do in Ruby?
A. Prints to console
B. Converts to string
C. Finds the length
D. Reads input from user

Join The Discussion