2 ms·
Putting aside the fact that using sizeof is risky in itself, i'd argue the default form should be strncpy (buffer, "abcd", sizeof(buffer)); assert (!bu
by nly 12y ago
Putting aside the fact that using sizeof is risky in itself, i'd argue the default form should be
strncpy (buffer, "abcd", sizeof(buffer));
assert (!buffer[sizeof(buffer) - 1]);