why the number of elements in an array is calculate incorrect when passing an array to a function; They don't work, but why, and what works without passing the quantity as a parameter.
int foo(int arr[])
{
return sizeof(arr)/sizeof(arr[0]
}
int foo2(int arr[])
{
int len = 0;
for(auto i: arr)
{
len++
}
return len;
}
☝️This function dont return correct