> On Wed, 28 Apr 1999, Glynn Clements wrote: > > # > In gcc, > # > > # > if i = 2; > # > then j = i++ + ++i; > # > > # > what is the value of j. > # > # i++ == 2 > # ++i == 3 > # => j == 5 > > no. it's not. I typed this in: > > main() { int i = 2; printf ("%d", i++ + ++i);} > and when i ran it i got 6 printed... > It's probably compiler dependent. I did the same thing: main() { int i=2; int j=i++ + ++i; i=2; printf("%d %d\n",j,i++ + ++i); } and it prints out 5 5.
- Another bit question Anukool Lakhina
- Re: Another bit question Glynn Clements
- Calling sequence Amol Mohite
- Allocation Amol Mohite
- Re: Allocation Brandon Callison
- Re: Allocation James
- Re: Calling sequence Glynn Clements
- Re: Calling sequence Amol Mohite
- Re: Calling sequence Kevin Sivits
- Re: Calling sequence James
- Re: Calling sequence Joseph Keen
- Re: Calling sequence James
- Re: Another bit question Anubhav Hanjura
- Re: Another bit question Anubhav Hanjura
- Re: Another bit question Anubhav Hanjura