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?
if 79>78
puts “True”.upcase
if 9>8
puts “True”.reverse
if 7==7
puts “equal”.downcase
end
end
end

What is the output of the given code?
if 79>78
puts “True”.upcase
if 9>8
puts “True”.reverse
if 7==7
puts “equal”.downcase
end
end
end
a) True
b) True eurt
c) TRUE
eurT
equal
d) equal

Answer: c
Explanation: String methods are used and every condition is true, hence every if block is executed.
Output:
TRUE
eurT
equal

Join The Discussion