3 ms·
If array is an array of `N` `T`s (`T array[N]`), then `sizeof array` is `N * sizeof(T)`. However, if you have a function parameter spelled `T array[N]`, that's
by MathMonkeyMan 2y ago
If array is an array of `N` `T`s (`T array[N]`), then `sizeof array` is `N * sizeof(T)`.
However, if you have a function parameter spelled `T array[N]`, that's really just a `T *array` with a helpful hint that it probably points to the beginning of an array of `N` `T`s. But it might not...
For the case of the function parameter, `sizeof array` is `sizeof(T*)`.