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

Explanation: 15<16 is true but 15<15 is false hence the overall expression will evaluate to false.

Explanation by: Vinay Kumar
15<16 is true but 15<15 is false hence the overall expression will evaluate to false.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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