News for hackers. Stuff that matters.
Re:Neverflow: Set of C macros that guard against buffer over... by adastra22 on Friday June 02, 2023 @02:02PM (#36168608)
Yes, but aside from string literals pointed out by a sibling comment, nothing in the language itself dictates this convention. The C library could be augmented with functions which expect strings structured in other ways.
Re:Neverflow: Set of C macros that guard against buffer over... by ixtenu on Friday June 02, 2023 @04:10PM (#36170113)
> nothing in the language itself dictates this convention.

String literals are nul-terminated, e.g.: "foo"[3] == '\0'