Originally posted by venkatesh rajmendram:
Hi, The above procedure might not be right...
b = (4 == 2 && ++i <= 1);
Here we have short circuit && , so the right side is not even evaluated i.e i never gets incremented....so
b = (false && ++i <=1);
b = false;
You can display the value of i before and after the execution it will remain unchanged...
- Venkatesh
hmmm, good catch venkatesh, you are correct with your assumption, the RHS is never evaluated, i should've seen that
. But anyways thanks for correcting me.
Ranchers, please disregard my previous post.