this post was submitted on 31 Aug 2024
2 points (100.0% liked)

The C Programming Language

32 readers
6 users here now

Everything related to the C programming language.

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 2 weeks ago

Yes and no. Sometimes a NUL terminated string allow you to make the simplest algorithms. Apart from NUL terminated strings I use structs with a buffer pointer and length or one with a start and an end pointer when that makes the implementation simpler. NULL terminated arrays are also often an efficient way to make your algorithms simple. Go for the data representation that allow you to make the simplest algorithms.