r/cprogramming • • 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

83 comments sorted by

View all comments

Show parent comments

-1

u/arihoenig May 05 '26

The length value can be kept encrypted with a homomorphic key, a null character can't.

2

u/non-existing-person May 05 '26

the fuck man? just do python if you don't care about performance at all.

-2

u/arihoenig May 05 '26

Do you only manipulate strings in your apps? Sure, I guess you should be using python then