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 given code?
counter=12
unless counter
print counter+1
else
print counter+2
end

What is the output of the given code?
counter=12
unless counter
print counter+1
else
print counter+2
end
a) 13
b) 14
c) 15
d) None of the mentioned

Answer: b
Explanation: Counter is assigned the value 1, so the unless conditional statement is true and hence it is not executed.

Join The Discussion