The array name "decays" to a pointer to its first element, int arr[] in a function signature is silently rewritten by the compiler as int *arr. The function receives that pointer by value, so the function can read and write the underlying array (because it has the address) but doesn't know how big it is, sizeof(arr) inside the function returns the size of a pointer (8 bytes on a 64-bit system), not the original array's byte count. That's why every C function that takes an array also takes a length argument explicitly. You can't recover the size after decay; if you need it, the caller must pass it.
Programming Fundamentals · Interview question
What happens when you pass an array to a function in C?
A strong answer
What a weak answer sounds like
You know the answer. Do you know what gets you dinged?
Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.
From the lesson
Arrays & Strings
A contiguous block of same-type values. How arrays work in memory, why indexing starts at 0, and the null-terminated convention that defines C-strings.