A

Admin • 833K Points
Coach

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
  • Correct Answer - Option(B)
  • Views: 15
  • Filed under category Ruby
  • Hashtags:

Explanation by: Admin

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.