2 ms·
In C, the value of x in that fragment is still the same: a pointer (ok, not exactly, but something which behaves like a pointer) to a memory location where an i
by cesarb 9y ago
In C, the value of x in that fragment is still the same: a pointer (ok, not exactly, but something which behaves like a pointer) to a memory location where an int can be stored. The f(x) call can't change that pointer.
- int_19h 9y agoTry doing something like &x, and you'll see that it doesn't actually reliably behave like a pointer.