November 2002
Beginner
432 pages
11h 44m
English
Many of C's operators, such as the plus sign, work exactly like those in other languages. Nevertheless, C's rich collection of operators requires some review so that you can grasp what C is all about. This section provides a quick overview of some of C's more interesting operators.
C supports increment and decrement operators. In Chapter 12, “Program Algorithms,” you learned about the concept of adding or subtracting 1 (one) to or from a variable to keep track of a count. C's ++ and -- operators add and subtract 1, respectively, from whatever variable you apply them to. The following statements add 1 to the variables a, b, and c:
a++; b++; c++;
The following statements decrease a, b, and c by one:
a--; b--; c--;
C also supports ...