3 ms·
No I'm not, read it again. The first one has size 3, because there are 3 elements in the array. The second one has size 8 because an int64 is 8 bytes.
by ars 3y ago
No I'm not, read it again.
The first one has size 3, because there are 3 elements in the array. The second one has size 8 because an int64 is 8 bytes.
- tialaramex 3y agoI'm just reporting facts, C's sizeof operator measures bytes, so sizeof(int64_t[3]) * sizeof(int64_t) is 192 You don't have to like it
- ars 3y agoI apologize, you are correct. It's been too long since I used c. I should write instead: sizeof(int64_t[3]) / sizeof(int64_t) for length of array. This does help my argument that Javascript length on a Unicode string should return bytes though :)