Here is my code:
#include <stdio.h>
int thi(int x, int *y) {
x=*y;
*y=2*x;
return x+*y;
}
int main () {
int x=1, y=2;
printf("%d, %d, %d", thi(y, &x), x, y);
}
I'm wondering that why the result is 3 1 2. This must be 3 2 2 right?