title: Why does a C-Array have a wrong sizeof() value when it's passed to a function?
body: <p>Complete example:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void test(int arr[]) {
      int arrSize = (int)(sizeof(arr) / sizeof(arr[0]));
      printf("%d\n", arrSize); // 2 (wrong?!)
  }
  
  int main (int argc, const char * argv[]) {
      int point[3] = {50, 30, 12};
  
      int arrSize = (int)(sizeof(point) / sizeof(point[0]));
      printf("%d\n", arrSize); // 3 (correct :-) )
  
      test(point);
  
      return 0;
  }
  </code></pre>
  
  <p>Before passing it to a function, sizeof gives me the correct value. Doing the exact same thing on the exact same array in the function gives weird results. There's one element missing. Why?</p>