strlen() on non-null-terminated char string?

No, it is not defined. It may result in a memory access violation, as it will keep counting until it reaches the first memory byte whose value is 0.

Leave a Comment