Discussion :: Ruby Programming MCQs
-
What is the output of the given code?a=trueb=falseif a && bputs "False"elsif a || bputs "True"elseputs "neither true nor false"end
Answer : Option B
Explanation :
True or false will always evaluate to true, hence the elsif block is executed.
Be The First To Comment