type: int (integer)
value: 7
address: 100
name: x
Examples:
x = 7 ;
y = x + 1 ;
y = y + 1 ;
z = y ;
Example:
x = y + 2 ;
z = x + 3*(y+1) ;
z = z - 1 ; z-- ;
Example: y = 4 ;
z = 3 + ++y ; z = 8
z = 3 + y++ ; z = 7
Example:
y = 4 ;
z = ++y + 5 ; ++ is performed before +
we say that the precedence of ++ is higher than that of +
You have to know the precedence of the operators. If you are not sure, use parentheses.
Example:
x = 4 is an expression
x = 4 ; is a statement
Sequence points are points in which the side effects are evaluated. A side effect is any modification of an object (data or file).