Nullterminator
A null terminator is a sentinel value used to indicate the end of a string or array. In the C family of languages, the terminator is the character '\0'—the ASCII NUL character with value 0. C-style strings consist of a sequence of bytes followed by this null byte, which marks the end of the string in memory.
How it works: A string literal such as "hello" compiles to the bytes h, e, l, l,
Safety considerations: When allocating storage for a C-style string, space must be reserved for the terminator.
Language variants: Some languages or APIs use length-prefixed strings that store the length explicitly and do
History and usage: The concept originates in C and Unix traditions, with ASCII NUL as a universal
---