C offers the programmer shortened versions of common statements:
|
a += b; /* equivalent to a = a + b */ a -= b; /* equivalent to a = a - b */ a *= b; /* equivalent to a = a * b */ a /= b; /* equivalent to a = a / b */ a &= b; /* equivalent to a = a & b */ a |= b; /* equivalent to a = a | b */ a ^= b; /* equivalent to a = a ^ b */ |
if constructions is the expression
|
b ? c : d /* evaluates to c if b is true, and d otherwise */ |
i++. This
evaluates to i, but then increments i by 1, and
++i which first increments i, and then returns the new
value. i can be decremented using the expressions i--
and --i, which behave analogously.