r/cprogramming • u/die-Banane • May 05 '26
How to do strings properly?
I just started learning C and I often read on the internet that it is bad practice to use null terminated strings, so my question is what should I do instead?
30
Upvotes
View all comments
1
u/KilroyKSmith May 05 '26
Strings in ‘C’ are fine, as are most of the standard string functions. But:
That said, doing strings in ‘C’ is like being given piles of iron ore, cement, and sand and deciding to build a skyscraper. It can be done, but a better starting point (for example, Python) would likely get things done sooner.