Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What is the output of the code?
if 1>2
puts “false”
end
else
puts “True”
end

What is the output of the code?
if 1>2
puts “false”
end
else
puts “True”
end
a) False
b) True
c) Syntax error
d) None of the mentioned

Answer: c
Explanation: No two end statements required after if and else just one end statement is sufficient.

Join The Discussion