Examveda
Examveda

What is the output of the given code?
hungry=false
unless hungry
 print "Not hungry"
else
 print "Hungry"
end

A. Not hungry

B. Hungry

C. Syntax error

D. None of the mentioned

Answer: Option A


This Question Belongs to Ruby Programming >> Control Structures In Ruby

Join The Discussion

Related Questions on Control Structures in Ruby