Why does sizeof(intArray)/sizeof(int) give different values?
<blockquote>
  <p><strong>Possible Duplicates:</strong><br>
  <a href="http://stackoverflow.com/questions/2993646/c-sizeof-for-array-length">C++: sizeof for array length</a><br>
  <a href="http://stackoverflow.com/questions/1328223/sizeof-array-passed-as-parameter">Sizeof array passed as parameter</a>  </p>
</blockquote>



<pre><code>#include "stdafx.h"
#include &lt;iostream&gt;

using namespace std;

void PrintArrayLength(int arr[])
{
    cout &lt;&lt; "Function Array length is: " &lt;&lt; sizeof(arr)/sizeof(int) &lt;&lt; endl;
}

int _tmain(int argc, _TCHAR* argv[])
{
    int arr[] = {1, 2, 3};

    cout &lt;&lt; "Array length is: " &lt;&lt; sizeof(arr)/sizeof(int) &lt;&lt; endl; // print 3

    PrintArrayLength(arr); // print 1
    return 0;
}
</code></pre>

<p>Why one place sizeof(arr)/sizeof(int) gives value of 1 and the other place gives value of 3?</p>
