Sure but that means the part before that is garbage because you have a null terminated string without terminator.
Or at least that’s how I see it. If your intention isn’t to start and end with a null-terminated string you should be using memcpy. Let us not talk about situations where CHAR_BIT!=8 that’s not POSIX anyway.
Even better, just avoid doing string manipulation in C.
Sure but that means the part before that is garbage because you have a null terminated string without terminator.
Or at least that’s how I see it. If your intention isn’t to start and end with a null-terminated string you should be using memcpy. Let us not talk about situations where
CHAR_BIT != 8
that’s not POSIX anyway.Even better, just avoid doing string manipulation in C.
Yeah, let’s not talk about 20-bit one’s complement ints.