I'm working with arrays that might have NULL bytes in them and I'm wondering how to determine the length of the array or store it somewhere with the array (strlen() won't help because of the NULL, right?).
I've found advice like store the length of the array in the first byte of the array, but since sizeof(size_t) is 8 should I leave the first 8 bytes for the length?
Would it be better do define my own structure which would store the array and its length? What's the usual way these things are handled in practice?