Here is a program
#include<stdio.h>
int main()
{
int i=2;
printf("I=%d i=%d\n",++i,++i);
}
The output I got was
4 4
it is a bit surprising output to me.
How does that ++i works? and why is that giving 4 4
and not 3 4
in result?
Just read it ,it is different from the thread which you people are marking it as duplicate.