A

Admin • 670.22K Points
Coach

Q. What is the result of the expression `true && false || true`?

  • (A) false
  • (B) true
  • (C) Error
  • (D) nil
  • Correct Answer - Option(B)
  • Views: 1
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Admin
`&&` has higher precedence than `||`, so it evaluates to `false || true` which is `true`.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.