Arithmetic Compound Assignment Operators: *=, /=, %=, +=, -= – Basic Elements, Primitive Data Types, and Operators

Arithmetic Compound Assignment Operators: *=, /=, %=, +=, -= A compound assignment operator has the following syntax: variable op= expression and the following semantics: variable = (type) ((variable) op (expression)) The type of the variable is type and the variable is evaluated only once. Note the cast and the parentheses implied in the semantics. Here … Read more