I am well aware that modifying a function\'s argument that is passed by value is ineffective outside of the C/C++ function, but compilers allow it - but what happens? Is a loca
A value parameter of a function is effectively a local variable of the function, except that it is initialised in the function call. So these:
void f( int n ) {
n++;
}
and:
void g() {
int n = 0;
n++;
}
are effectively the same, if the call to f() was made as f(0). In both cases, the variable will be discarded on function exit.