View Single Post
Old 07-29-2000, 08:46 AM   #3
toji
Member (5 bit)
 
Join Date: Jul 2000
Posts: 16
Question

int i=5,j;
j=i++ + ++i;
cout<
will display 12,7

Unary operators have precedence over + operator. Then,
why doesn't the assignment part of i++ (i.e. assigning
i+1 to i) take place before the addition?

Why
int i=5;
cout< shows 6,6 ?

'am lost!

toji is offline   Reply With Quote