I'm currently studying C and I'm having a hard time wrapping my head around how exactly short circuit evaluation works.
Two examples provided to me were:
I know from my notes that the first evaluation returns 0 1 0Code:int a = 1, b = 1, c = -1; c = --a && b--; printf("%d %d %d", a, b, c); a = 0, b = 0, c = -1; c = a++ || ++b; printf("%d %d %d", a, b, c);
and the second evaluation returns 1 1 1. What I can't quite seem to get is why?