TOPIC 5.1.2
Compound Operators


The following operators are bitwise compound operators and are similar to the arighmetic assignment operators.

These operators work the same as the bitwise operators discussed in 7.1.2 Bitwise Operators, with the shorthand notation of compound operators. The only drawback, as with the other compound operators, is that the compound operators have lowest precedence in the order of operations. Which as you might have already found out, may causes bugs that are hard to detect. The only way to be able to find these bugs is by practice and example. The following practices should help you feel more comfortable using compound operators.

int x, y = 10, z = 5;
x += 100 * z
x = 10;
x += z * 10;
x = 10;
x *= 10 * x;
x = 10;
x /= x;
x = 2;
x /= x--;