Discussion :: Ruby Programming MCQs
-
What is the output of the given code?hungry=falseunless hungryprint "Not hungry"elseprint "Hungry"end
Answer : Option D
Explanation :
As hungry is initialized to false hence the unless condition is executed. Output: Not hungry
Be The First To Comment