Could someone help me with this. Passed by value would be the result i get from actually running this program right? But I am confused about the passed by reference. Can anyone solve this and explain how you got your answers. Thanks
void foo(int x, int y)
{
i = y;
y += 3;
}
void main()
{
i = 2;
j = 3;
foo(i, j);
printf("%d %d\n", i, j);
}
what would the output be if you:
passed by value:
passed by reference:
and passed by value-result:
thanks