You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The increment and decrement operators can be applied after the variable (such as ```count++``` or ```count--``` ), creating what is called the postfix form of the operator.
48
+
- They can also be applied before the variable (such as ```++count``` or ```--count```), in what is called the prefix form.
49
+
- When used alone in a statement, the prefix and postfix forms are functionally equivalent. That is, it doesn’t matter if you write ```count++``` or ```++count```.
50
+
- When the increment or decrement operator is used in a larger expression, it can yield different results depending on the form used.
51
+
- For example, if the variable count currently contains the value 15, the following statement assigns the value 15 to total and the value 16 to count: ```total = count++;```
52
+
- the following statement assigns the value 16 to both total and count: ```total = ++count;```
0 commit comments