hey everyone.. i am new to C and need your help with telling me the differences between call by value, reference name and copy-restore...
right now i am trying to figure out what the outputs for this code are gonna be based on those cases
i figure out that by reference the output of this code will be 14... but what about by value? name? and copy-restore??Code:#include <stdio.h> int a; void f(int x, int y) { x += a; a += 2*y; } int main() { a = 3; f(a, 4); printf("%d\n", a); return 0; }
any help is appreciated .. thanks



LinkBack URL
About LinkBacks




