I was practicing some exercise from the book, so I wrote down the program below.
The result should be 1 8 8 9, but I don't know how this expression work.
int i = 7, j = 8, k = 9;
printf("%d ", (i = j) || (j = k));
printf("%d %d %d", i, j, k);
How to interpret the expression (i = j) || (j = k)?
In the first parentheses (i = j), did the program assign 8 to i?
If so, why didn't it assign 9 to j as well, in the second parentheses (j = k)?
Later on, why the i remain as 8, when was it saved?