4 comments

[ 3.5 ms ] story [ 19.5 ms ] thread
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]);