Possible Duplicate:
What’s the side effect of the following macro in C ? Embedded C
What will be the output for the following:
#include <stdio.h>
#define MAN(x,y) ((x) < (y))?(x):(y)
main()
{
int i=10,j=5,k=0;
k= MAN(i++,++j);
printf("%d %d %d" ,i,j,k);
}
Here i thought that MAN(10,6) will be called and the output will be:
11 6 6
However the output is
11 7 7
Can some one please explain this.