...
Example: float int val;
Wiki Markup |
---|
int arr \[ARR_SIZE\]; |
...
size_t c2 = sizeof (arr) / sizeof (val);
size_t c3 = sizeof (arr) / sizeof (*arr);
The derived type in the above example is float int for c1, is ... int for c2 (since both sub-expressions have same type which is int), and is an unspecified character type compatible with any of char, signed char and unsigned char for c3.
Effective size of a pointer is the size of the object to which it points.
...