Home / Programming MCQs / Ruby MCQs / Question

M

Mr. Dubey • 51.43K Points
Coach

Q. What is the output of the given code?
var =  1
print "1 -- Value is set\n" if var
print "2 -- Value is set\n" unless var
var = false
print "3 -- Value is set\n" unless var

(A) 1–Value is set
(B) 2–Value is set
(C) 1–Value is set 2–Value is set
(D) 1–Value is set 3–Value is set

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.