Examveda

What is the output of the given code?
x="ruby".length
y="language".length
puts x,y
unless x>y 
print "length of x is less than that of y"
end

A. 4
8

B. 4
8
length of x is less than that of y

C. Syntax error

D. None of the mentioned

Answer: Option B


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

Join The Discussion

Related Questions on Control Structures in Ruby