Q:

Assuming i, j, and k are all ints, explain what i != j < k means

0

Assuming i, j, and k are all ints, explain what i != j < k means.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

The expression `i != j < k` is the same with `i != (j < k)`.

First, `j < k` is evaluated and the result is a `bool`(either `true` or `false`).

Second, `i != true` or `i != false` is evaluated. Since `i` is an `int`, the `bool` will be converted to `int`, which means `i != 1` or `i != 0` is evaluated.

 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now