Skip to content
Design Corner Knowledge Base ← Back to designcorner.co.ke
Knowledge Base

Software and Development

Null-Terminated String

1 min read Updated November 10, 2026

Definition A way of storing text where a zero byte marks the end of the string.

What it is

In languages such as C, text is stored as characters followed by a null value that signals the end. Forgetting the marker, or writing past it, causes bugs.

Why it matters for your business

Mistakes in handling these strings have caused many security holes.

Real-world example

A C program in a point-of-sale system crashes when a customer name is longer than expected.

Design Corner tip

Prefer modern languages and libraries that handle strings safely, and test inputs with long values.