πŸ“Š Ruby
Q. What will be the output of the given code?
Code:
boolean_var = false || -20 > -18
puts boolean_var
  • (A) TRUE
  • (B) FALSE
  • (C) Type Error
  • (D) Syntax Error
πŸ’¬ Discuss
βœ… Correct Answer: (B) FALSE

Explanation: 20 is not greater than -18 hence the output will be false || false which is false.

Explanation by: Vinay Kumar
20 is not greater than -18 hence the output will be false || false which is false.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
227
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Vinay Kumar
Publisher
πŸ“ˆ
89%
Success Rate