Consider the following program written in C pseudocode:
int a = 1; /* global */void foo(int x){ a++;x = x + 2; } void main(){ foo(a); }
For each of the following parameter-passing methods, what will be the values ofa andb after running the program?
1) Passed by value
2) Passed by reference
3) Passed by value-result
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here