Null-terminated string
In computer programming, a null-terminated string is a character string stored as an array containing the characters and terminated with a null character (a character with an internal value of zero, called "NUL" in this article, not same as the glyph zero).[src] Alternative names are C string, which refers to the C programming language and ASCIIZ (although C can use encodings other than ASCII).[src] The length of a string is found by searching for the (first) NUL.[src] This can be slow as it takes O(n) (linear time) with respect to the string length.[src] It also means that a string cannot contain a NUL (there is a NUL in memory, but it is after the last character, not the string).[src]
In computer programming, a null-terminated string is a character string stored as an array containing the characters and terminated with a null character (a character with an internal value of zero, called "NUL" in this article, not same as the glyph zero).[src] Alternative names are C string, which refers to the C programming language and ASCIIZ (although C can use encodings other than ASCII).[src] The length of a string is found by searching for the (first) NUL.[src] This can be slow as it takes O(n) (linear time) with respect to the string length.[src] It also means that a string cannot contain a NUL (there is a NUL in memory, but it is after the last character, not the string).[src]
10 sentences · 10 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Null-terminated string." encyclopegia.org, 2026, https://encyclopegia.org/wiki/null-terminated-string. Accessed 27 November 2026.
Chicago
"Null-terminated string." encyclopegia.org. Accessed November 27, 2026. https://encyclopegia.org/wiki/null-terminated-string.
APA
encyclopegia.org. (2026). Null-terminated string. Retrieved November 27, 2026, from https://encyclopegia.org/wiki/null-terminated-string
Accessed November 27, 2026 · CC BY-SA 4.0 · citation page · JSON