Arrays are not copyable things in C and C++. Therefore inventors of thesele languages were forced to add somę non-intuitive automatic Type conversion from array to pointer onto their first element in order to offer programmer a way to pass array as argument to function.
Using sizeof operator (not a function) on such argument returns size of pointer Type rather than data size.
extra cents
sizeof operator is expanded during compilation rather run time. From the other side passed Arrays to a function could have different sizes. So casting such Arrays to pointers has another one explanation: sizeof couldnt resolve size of different Arrays during compile time.