In the below example will the comparison between a
and c
be executed or will it be skipped? I would assume the answer is no because the value of valid
has already been determined since if any comparison is false
in this expression the resulting value of valid
is false
, but I don't actually know if that's true.
int i = 10, b = 20, c, 30;
bool valid = (i > b && a < c);
Thanks for taking the time to answer my question!