Possible Duplicate:
Sizeof an array in the C programming language?
I have been working on this for long, but can't seem to understand why this is happening.
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;
}
Why is the Output:
Size is 10
Size is 4