یک مثلا از فراخوانی با روش کپی / بازیابی یا call by copy restore
یک مثلا از فراخوانی با روش کپی / بازیابی یا call by copy restore
int a;
void unsafe(int x) {
x= 2; //a is still 1
a= 0; //a is now 0
}//function ends so the value of x is now stored in a -> value of a is now 2
int main() {
a= 1;
unsafe(a); //when this ends the value of a will be 2
printf("%d\n", a); //prints 2
}