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

Explanation: 100/10=10 which is true but the ! before 100/10==10 will evaluate to false hence the overall expression will evaluate to false.

Explanation by: Vinay Kumar
100/10=10 which is true but the ! before 100/10==10 will evaluate to false hence the overall expression will evaluate to false.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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