31. The given two expression means the same.
counter=counter+1 and counter++
counter=counter+1 and counter++
32. What is the output of the given code?
a = 5
b=10
while (a <10 || b<20)&&true
puts a*b
a+=2
b+=2
end
a = 5
b=10
while (a <10 || b<20)&&true
puts a*b
a+=2
b+=2
end
33. The boolean operator && only result in true when both the values are true?
34. What will be the output of the given code?
boolean_1 = !(700 / 10 == 70)
puts boolean_1
boolean_1 = !(700 / 10 == 70)
puts boolean_1
35. What will be the output of the given code?
boolean_1 = 77 < 78 && 77 < 77
puts boolean_1
boolean_1 = 77 < 78 && 77 < 77
puts boolean_1
36. What will be the output of the given code?
boolean_2 = !true && (!true || 100 != 5**2)
puts boolean_2
boolean_2 = !true && (!true || 100 != 5**2)
puts boolean_2
37. What will be the output of the given code?
boolean_1 = !(3 < 4 || false) && (false || true)
puts boolean_1
boolean_1 = !(3 < 4 || false) && (false || true)
puts boolean_1
38. Which of the following are used for comparison?
39. What is the output of the given code?
a = 22.5
while a >11.5
puts a
a-=3.5
end
a = 22.5
while a >11.5
puts a
a-=3.5
end
40. What is the output of the given code?
counter = 100
while counter > 0
puts counter
counter/=5
end
counter = 100
while counter > 0
puts counter
counter/=5
end