I don't know if this is a suitable subforum to talk about the the following
Suppose we have a function called foo() which receive two arguments foo(a,b) and swap them.
The expected output:Code:int n1 = 2, n2 = 33; // before swap print n1, n2; foo(n1,n2); // after swap print n1, n2; // the function foo(a, b) { int temp = a; a = b; b = temp; }
>> 2 33
>> 33 2
Is that right or de we have to work with "pointers"?