3 ms·
The problem is - what even is a "string" in C? An arbitrary number of arbitrary bytes that you hope ends in a null, but you'll never know unless you check, and
by krapp 8y ago
The problem is - what even is a "string" in C?
An arbitrary number of arbitrary bytes that you hope ends in a null, but you'll never know unless you check, and even when you check, do you really know? Was that null really where that string was supposed to end?
There's never going to be a single, universally valid and correct way to deal with a "type" that is structurally just a step above random garbage.