Hi, I am having the following problem. Assume the code:
int i = 4, j = 7;
int *p = &i, *q = &j;
i = (*p)++ + *q;
After that, variable i will take value 12, right? Now, assume the following modification:
int i = 4, j = 7;
int *p = &i, *q = &j;
i = (*p)++ * *q;
Following the same reasoning, variable i would be equal to 29.
However, using gcc (linux), variable i is equal to 5 in both cases!!! Under windows, I get 12 and 18, respectively!
Does anyone know why???
Thanks in advance!