Is reading into uninitialized memory space ALWAYS ill advised?
问题 I am recreating the entire standard C library and I'm working on an implementation for strle n that I would like to be the basis of all my other str functions. My current implementation is as follows: int ft_strlen(char const *str) { int length; length = 0; while(str[length] != '\0' || str[length + 1] == '\0') length++; return length; } My question is that when I pass a str like: char str[6] = "hi!"; As expected, the memory reads: ['h']['i']['!']['\0']['\0']['\0']['\0'] If you look at my