this is a question a got in a midterm and i couldn't figure out the answer yet:
consider this :
int x, y, z
given this line of codes :
z = x;
x = y;
y = z;
which of the following BEST describe the code ?
A. it swaps the values in variables x and y.
B. it swaps the values in variables y and z.
C. it swaps the values in variables x and z.
D. it rotates the value among the variables x,y and z.
It might help if you do a quick check to see which variable's original values are actually used. That would probably give you enough to answer the question, actually.