In Type 1: Line 3 is treated as an expression and based on the Operator Precedence the increment [ ++ ] operatortakes precedence over summation [ + ] operator. Hence in the expression the increment operation is done first and then the summation operation is done thus the output of the expression will be 24 .In Type 2: Line 2 is treated as an assignment statement and is hence evaluated from left to right. Thus the value of ' y ' in this case will be 21.