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?
variable=true
if !variable
puts “true”
else
puts “false”
end

What is the output of the code?
variable=true
if !variable
puts “true”
else
puts “false”
end
a) False
b) True
c) Syntax error
d) None of the mentioned

Answer: a
Explanation: Condition is not satisfied so else part is executed.

Join The Discussion