Code:
#include <stdio.h>
int main()
{
int i = 3;
printf("%d %d %d %d %d\n",i = 7,--i,i = 18, i+5, i = 0);
printf("%d %d %d %d %d\n",i = 7,i--,i = 18, i+5, i = 0);
return 0;
}
Output:
7 7 7 5 7
7 18 7 5 7
Why I am getting this output, can anyone explain to me how are these expressions inside printf
statements are executed?
I mean, in which order are considered by compiler?