Code: CPP
main()
{
    int a=2;
    printf("%d %d %d",a,a++,++a);
}
for the above program igot the result as 4,3,3
but
Code: CPP
main()
{
    int a=2;
    printf("%d",a);
    printf("%d",a++);
    printf("%d",++a);
}
fetched me this result 2,2,4

may i know why?
altafahmed2k4@yahoo.co.in

Last edited by shabbir; 26Aug2006 at 19:30.. Reason: Code formating.