Why isn\'t the size of an array sent as a parameter the same as within main?
#include
void PrintSize(int p_someArray[10]);
int main () {
In C language when you pass the array as an argument to the function , it is automatically converted into pointer ,array passing from one function other function is know as call by reference . That is the reason the called function only receives the pointer which point to the first element of function This is the reason
fun(int a[]) is similar to fun(int *a) ;
so when you print the size of array it will print the size of first element.