SWAP function

I wrote it quickly in Java, and the results of SWAP (i, J) were not exchanged (SWAP (R [i], R [J])
but swap (R, i, J) Yes, I do n’t understand, is n’t it all exchanges. Are it deterrent?????

3 thoughts on “SWAP function”

  1. It is a simple type such as INT, which is the value of the value. After the value is changed, it will not affect the value of the call statement, and only valid in this function.

    This array is not. It is the address. After the value is changed, the value of the call statement will also change.

Leave a Comment