Hi friends,
I am new to the C language and need some help with the increment operator '++'. Please check the following code snippet:
Code:
int i,a;
i=0;
a = i++ + i++;
printf("\n i++ + i++ = %d",a);
i=0;
printf("\n i++ + i++ = %d",i++ + i++);
The output :
Code:
i++ + i++ = 0
i++ + i++ = 1
I do not understand the difference in the output of the operator. Please help.
Thank you.