What is the Scope of a funtion return? In this example
Code:int main() { int a,b; a=5; a = foo(a); printf("%d", a); } int foo(int x) { x = x + 2; return x; }
It appears that if the function foo is passing by value but the purpose is to re value a in main. How is this possible if not by reference?
Thanks in advance