title: Why it gives wrong array size
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1975128/sizeof-an-array-in-the-c-programming-language">Sizeof an array in the C programming language?</a>  </p>
  </blockquote>
  
  
  
  <p>I have been working on this for long, but can't seem to understand why this is happening.</p>
  
  <pre><code>void fun(char []);
  
  void fun(char a[])
  
  {
  
     printf("Size is %d\n",sizeof(a));
  
  }
  
  int main ()
  
  {
  
    char arr[10] = { 0 };
  
    printf("Size is %d\n",sizeof(arr));
  
    fun(arr);  
  
    return 0;
  
  }
  </code></pre>
  
  <p>Why is the Output:</p>
  
  <p>Size is 10</p>
  
  <p>Size is 4</p>