How does this array manipulation work in C++?
<pre><code>void revalue(int r, int ar[], int n)
{
    for(int i=0; i&lt;n;i++)
    {
        ar[i]*=r;
    }
}
</code></pre>

<p>So I'm really confused with how this code works and why it changes the ar[]. The thing is I thought that everytime you pass variables that aren't reference or pointers into a function a copy of the variable is made, then the copy is deleted after it goes out of scope of the function. Yet this function changes the array values. </p>

<p>How is this possible? </p>
