4 ms·
That’s what strncpy() is for
That’s what strncpy() is for
Watch out: what strncpy does is usually not what you'd want it to do.
No, it's not. strcpy is fine to use if the destination buffer is larger than you need or uninitialized. That's idiomatic...