the evalution will be done from right to left in printf statement..........so ++x will be evaluted and then x++.....may be the out put is 6 and 6 i think
On 13 December 2010 22:39, siva viknesh <[email protected]> wrote: > #include<stdio.h> > int main() > { > int x = 5; > printf("%d %d", x++, ++x); > > return 0; > > } > > for this output is "6 7" ... how evaluation proceeds?? > > -- > Regards, > $iva > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<algogeeks%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
