4 ms·
I assume the caller has the responsibility to ensure that x is actually large enough to contain y.
by troels 13y ago
I assume the caller has the responsibility to ensure that x is actually large enough to contain y.
- tel 13y agoThey have to ensure that the strings are \0 terminated, so why not? C is definitely pre-condition-or-else.
- noir_lord 13y agoYou are probably right (and this is one of the reasons why as a language C and C++ can really blow up in your face).
- dnautics 13y agothat's why there are alternatives such as strncat.