If int var=20 then how
printf("%d %d %d", var--, ++var, --var);
execution happens in C programming language.
If int var=20 then how
printf("%d %d %d", var--, ++var, --var);
execution happens in C programming language.
It is undefined behaviour because var
is modified several times without a sequence point in between. A sequence point would be, for example, a ;
. The commas in parameter lists, do, however, not introduce sequence points, also the order in which the operands are evaluated is undefined (you could say, the code is doubly undefined ...).