\

Assignment Operators

Operator Sample expression Meaning
-= x-= 4 x = x - 4
+= x+= 4 x = x + 4
*= x*= 4 x = x * 4
/= x/= 4 x = x / 4
%= x%= 4 x = x % 4
-- x-- postdecrement: use the value of x and then decrement by 1
-- --x predecrement: decrement by 1 and then use the value of x
++ x++ postincrement: use the value of x and then increment by 1
++ ++x preincrement: increment by 1 and the use the value of x


For more details, please contact me here.
Date of last modification: March 26, 2019.