1st part:
i=j=k=1;
m = ++i && ++j || ++k;
printf("%d, %d, %d, %dn", i, j, k, m);
output: 2, 2, 1, 1
1st part easily understood ,Here ++i && ++j execute first, which is true (and increment value of i and j) so there is no need to check next part of OR operation(no need increment value of k) .
2nd part:
i=j=k=1;
m = ++i || ++j && ++k;
printf("%d, %d, %d, %dn", i, j, k, m);
output: 2, 1, 1, 1
2nd part confusing to understand ,Here ++i || ++j execute first, in which ++i is true (and increment value of i, since OR opreation so no need to increment value of j ). Next execute AND operation here should be increment value of k=2(but still value of k print 1).
Dear altruist, please explain me what happen in 2nd part.
