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?
test_1 = 17 > 16
puts(test_1)
test_2 = 21 <= 30
puts(test_2)
test_3 = 9 >= 9
puts(test_3)
test_4 = -11 > 4
puts(test_4)

What is the output of the given code?
test_1 = 17 > 16
puts(test_1)
test_2 = 21 <= 30
puts(test_2)
test_3 = 9 >= 9
puts(test_3)
test_4 = -11 > 4
puts(test_4)
a) True false true false
b) True True True False
c) False False True True
d) None of the mentioned

Answer: b
Explanation: All the expressions which are correct will evluate to true rest all will evaluate to false.
Output:
true
true
true
false

Join The Discussion