Operators In Ruby - Study Mode

[#1] The given two expression means the same. counter=counter+1 and counter++
Correct Answer

(A) True

[#2] 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
Correct Answer

(B) 50 84 126 176 234

[#3] The boolean operator && only result in true when both the values are true?
Correct Answer

(A) True

[#4] What will be the output of the given code? boolean_1 = !(700 / 10 == 70)
puts boolean_1
Correct Answer

(B) False

[#5] What will be the output of the given code? boolean_1 = 77 < 78 && 77 < 77
puts boolean_1
Correct Answer

(B) False