Compound Assignment Statements
#include <stdio.h>
int main(void)
{
int a, b, c;
a = b = c = 0; /* actually have multiple expressions here -
a = (b = (c = 0));
where each set of () represents an expression */
c = a += 10; /* poor practice - have a side effect in an expression
where a += 10 is the expression with a side effect */
c = a++ + ++a; /* very poor practice - multiple side effects on the same
variable in an expression - different results from
different compilers since result is NOT defined */
a++; /* no real expression thus no side effects just shorthand
for a = a + 1; */
c *= 10; /* no real expression thus no side effects just shorthand
for c = c * 10 */
return (0);
}