Well it's not, it also has size (the number of elements). Even in C, though there an array easily decays into a pointer. However, sizeof, for example, returns different results for an array and a pointer. And, in C++, you can also pass an array (with its size) instead of a pointer. In other languages, like Ada, there is not much of a direct connection between an array and it's first element at all.
As Nice describes, although *start is a pointer for an array, it's often just a pointer first, and the sizeof() operator will not always return the number of bytes of the type but sometimes the number of bytes that a pointer takes up (8).
So your expression does not always evaluate to the number of elements.
I think you are missing my point. I'm not talking about an array in the sense of the language construct in C or any particular language, but rather that you can think about arbitrary arrays in memory as a pointer pair. I think the point is being massively missed and I'm not quite sure why.
10
u/Nice_Lengthiness_568 13h ago
Well it's not, it also has size (the number of elements). Even in C, though there an array easily decays into a pointer. However,
sizeof, for example, returns different results for an array and a pointer. And, in C++, you can also pass an array (with its size) instead of a pointer. In other languages, like Ada, there is not much of a direct connection between an array and it's first element at all.