41.
What is the output of the given code?
if 11>2
   puts "Eleven is greater than two"
   end
   print "You'r right"

43.
What is the output of the given code?
if 79>78
   puts "True".upcase
   if 9>8
   puts "True".Upcase
   if 7==7
   puts "equal".downcase
   end
   end
   end

45.
What is the output of the given code?
x=1
    if x > 2
    puts "x is greater than 2"
    elsif x <= 2 and x!=0
    puts "x is 1"
    else
    puts "I can't guess the number"
    end

47.
What is the use of else statement?

Read More Section(Control Structures in Ruby)

Each Section contains maximum 100 MCQs question on Control Structures in Ruby. To get more questions visit other sections.