


1/24/00
COM1100 Winter2000 Lecture 7
Summary --
increment and decrement operators
nFour possibilities
n
n
n
n
nAuto increment/decrement most useful with subscripts,
pointers and loop counters
nMay be used in expressions
nOften used in stand-alone
nZ = I * I;
n ++I;
use old
value of x, the decrement x
decrement
x, the use new value
use old
value of x, the increment x
increment
x, the use new value