previous | index | next

How C++ Passes Arrays to Functions

Q: Is clear's array v a copy of the array a from the calling statement?

A: No, because if it was the original array a would not be changed.

Q: Did clear receive the original array a (giving it a different name v), modify it, and then return it to the calling statement?

A: No, because clear is declared to be void (returns nothing).

Q: Then what did clear receive from the calling statement?

A:


previous | index | next