r/cprogramming • u/Xaneris47 • Aug 17 '26
C Strings: A 50-Year Mistake
https://longtran2904.substack.com/p/c-strings-a-50-year-mistake?r=8qz2zb&utm_campaign=post&utm_medium=web
212
Upvotes
r/cprogramming • u/Xaneris47 • Aug 17 '26
View all comments
0
u/Physical_Dare8553 Aug 17 '26
The real problem is a char* with a null terminator and one without it are not different types, and because of how x works, in practice neither is a char[n]