3 ms·
This is why C is sort of unassuming in its "sizeof arr / sizeof *arr" pattern. Whenever you write a new type, just write a sizing function for it using sizeof.
by arihant 11y ago
This is why C is sort of unassuming in its "sizeof arr / sizeof *arr" pattern.
Whenever you write a new type, just write a sizing function for it using sizeof. I like that Go is taking a similar route, except that one just implements the signature.