ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
What is the output of the given code
a=[1,2,3,4,b=[1,2,3,4,if a==b
print "Equal"
else
print "Not equal"
end
Correct Answer: C — Equal
puts boolean_array[1] outputs 'False' and returns nil. string_array[nil] returns nil, so puts outputs nothing — effectively 'o' is printed.