Having an issue with C and understanding how the compiler is processing this code
#include <stdio.h>
int j=0;
int main(int argc, char *argv[]){
printf("%d %d %d %d %d\n",j++, j*5, j++, j++, j);
}
Hi okay so basically i am trying to understand what is going on here?
when i compile and run i get this as a result
2 10 1 0 0
it is not clear to me what exactly the compiler is doing, why does the number change like that? which one is being done first and why does some report a 0 while other 2 and none reports a 3?