Home / Programming MCQs / Ruby MCQs / Question

V

Vinay Kumar • 8.45K Points
Tutor III

Q. What will be the output of the given code?

Code:
boolean_var = false || -20 > -18
puts boolean_var
(A) TRUE
(B) FALSE
(C) Type Error
(D) Syntax Error

Explanation:

20 is not greater than -18 hence the output will be false || false which is false.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.