a side effect: the value is stored into the object denoted by the left-hand side.
For example, the expression
delta = 2 * 12
has the value 24 and the side effect of storing this value into delta.
In C++, any expression becomes an expression statement when it is terminated by a semicolon. All three of the following are valid C++ statements, although the first two have no effect whatsoever:
23;
2 * (alpha + beta);
delta = 2 * 12;
The third expression statement is useful because of its side effect of storing 24 into delta.
Assignment Expression A C++ expression with (1) a value and (2) the side effect of storing the expression value into a memory location.
Expression Statement A statement formed by appending a semicolon to an expression.
Because an assignment is an expression, not a statement, you can use it anywhere an expression is allowed. Here is a statement that stores the value 20 into firstInt, the value 30 into secondInt, and the value 35 into thirdInt: