previous | index | next

Simulating Call by Reference

We can explicitly pass the addresses of p and q:

...
swap(&p, &q);
...

Q: How must swap be changed?


previous | index | next