HI SHILPA AGAIN IT'S ME
well about u r first dought
when u say
int i=0;
i=i++;
the ++ operator is used as postincrement
which say's " i am not in hurry first do u task & then give me chance"
so in this case i is assigned first & then incrmented
so when it is incremented to 1 there is nothing to do with
that 1 so it is becomes prey for the hungry garbage collector
no again if u say i=i++;
again the old value of i=0 is taken & same thing is
perform
while if u use i=++i;
u will get the desired result;
now about ur 3) dought
well i am sorry to say but in this case u r wrong.
the precidence for '=' operator is from right to left.
try following code for more clear vision
int a[] ={100,200}//so a[0]=100 & a[1]=200
int b=4;
a[b]=b=0;
S.O.P("a[0]="+a[0]);
the o/p for above code is
a[0]=0;
cause first b=0 takes place
then the vale 0 of b is assigne to a[0];
got it???
[email protected]