Fill in the table with the values of a,b, and c after each statement has been executed. void Test (int &x, int y, int &z) { x = x+y; y = y + z; z = z-x; } void main(void) { a b c int a =10, b=20, c=30; 10 20 30 Test(a,b,c); 30 20 0 Test(c,b,a); _ _ _ } I don't know what goes for the spaces of "Test(c,b,a)"
This is in c++
not 100% sure what the problem is?
oid Test (int &x, int y, int &z) {
What's the & for? Your Y doesn't have one either....
The & means call by reference, and no & means call by value.
I'm trying to find out what the last 3 values are for a,b,c.
code doesn't run...? I'm not too sure about passing by reference, Java only passes by value.
c = x, b = y, a = z.
Join our real-time social learning platform and learn together with your friends!