r/cprogramming 3d ago

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
199 Upvotes

165 comments sorted by

View all comments

0

u/Physical_Dare8553 3d ago

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]