62.
What is the output of the given code?
counter=6
   if counter<=5
   puts (counter)
   counter=counter+1
   puts (counter)
   elsif counter>5
   puts (counter)
   counter=2*counter
   puts(counter)
   else 
   puts(counter)
   counter=counter-1
   puts(counter)
   end

63.
What is output of the given code?
counter=-3
   if counter<=5
   puts (counter)
   counter=counter+1
   puts (counter)
   elsif counter>5
   puts (counter)
   counter=2*counter
   puts(counter)
   end

67.
What is the output of the given code?
a=true
   b=false
   if a && b
   puts "False"
   elsif a || b
   puts "True"
   else
   puts "neither true nor false"
   end

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.