The behaviour is undefined
because changing a variable twice between two sequence points.
c99 standard : 5.1.2.3 Program execution
2
"Accessing a volatile object, modifying an object, modifying a file, or calling a function
that does any of those operations are all `side effects` which are changes in the state of
the `execution environment`. Evaluation of an expression may produce side effects. At
certain specified points in the execution sequence called `sequence points`, all side effects
of previous evaluations shall be complete and no side effects of subsequent evaluations
shall have taken place."
Here you are modifying a variable a
twice between two sequence points.
Extended EDIT : If you know these concept already and thinking about that ,
comma operator is a sequence point so it should work as a well defined
program.Then you are wrong ,
used here in function call is comma separator
not comma operator