--- In [email protected], Rick <[EMAIL PROTECTED]> wrote: > > At 1/18/2007 05:25 AM, you wrote: > >if a=5 > >b=a++ > >c=++a > >solve the value of (b+c)? > >pls Solve and Explain .......... > > Do you have a compiler? If so, enter this as a program and then print > the values. > If you don't have a compiler, why do you care? > > > > > >[mod - http://www.catb.org/~esr/faqs/smart- questions.html#homework - PJH] > > > > > >To unsubscribe, send a blank message to > ><mailto:[EMAIL PROTECTED]>. > >Yahoo! Groups Links > > > > > > >b+c=5+7=12 b'coz first increment(a++) is postfix so first value assign to b and then increase by 1. In second there prefix increment so first value increase by 1 and then assign to c since in first the value of a becomes 6 hence in second statement it it becomes 7 means c=7 so finally b=5 and c=7 so answer is 12
