Here you can find some code to verify by your own.
// a global variable
float array[10];
void countNumber(float array[])
{
int number= sizeof(array)/sizeof(float);
printf("NUMBER of array: %d\n", number);
}
int main()
{
countNumber(array);
// NOT CORRECT: Result is 2
int number= sizeof(array)/sizeof(float);
printf("NUMBER of array: %d\n", number);
// CORRECT: Result is 10
}
I don´t understand why I get two different result (2 vs. 10 for the size of the array) but the calculations are the same.