Ask your own question, for FREE!
Computer Science 8 Online
OpenStudy (anonymous):

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)"

OpenStudy (anonymous):

This is in c++

OpenStudy (konradzuse):

not 100% sure what the problem is?

OpenStudy (konradzuse):

oid Test (int &x, int y, int &z) {

OpenStudy (konradzuse):

What's the & for? Your Y doesn't have one either....

OpenStudy (anonymous):

The & means call by reference, and no & means call by value.

OpenStudy (anonymous):

I'm trying to find out what the last 3 values are for a,b,c.

OpenStudy (konradzuse):

code doesn't run...? I'm not too sure about passing by reference, Java only passes by value.

OpenStudy (konradzuse):

c = x, b = y, a = z.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!