J
jobo
Suppose I have a function foo:
void foo(int x, int y) {
printf(" %d ", y);
x = y;
}
I have two ints a and b.
a = 7;
b = 7;
then I call foo(a, ++b);
For some reason at the end of running foo, I get a = 7 and b = 8.
Why do I not have a = b = 8?
Thank you much!
void foo(int x, int y) {
printf(" %d ", y);
x = y;
}
I have two ints a and b.
a = 7;
b = 7;
then I call foo(a, ++b);
For some reason at the end of running foo, I get a = 7 and b = 8.
Why do I not have a = b = 8?
Thank you much!