Challenge 2: A Manual strlen, Compared Against the Real One — Possible Solution ==================================================================== #include #include size_t my_strlen(const char *s) { size_t count = 0; while (s[count] != '\0') { count++; } return count; } int main() { char test[] = "hello world"; printf("my_strlen: %zu\n", my_strlen(test)); printf("real strlen: %zu\n", strlen(test)); return 0; } Output: my_strlen: 11 real strlen: 11 WHY THIS WORKS AS AN ANSWER ------------------------------ my_strlen implements exactly the scanning behavior the chapter describes strlen as doing internally -- walking forward one character at a time, counting, until it hits the '\0' sentinel -- and the two functions agreeing on the same length (11) confirms this manual implementation correctly reproduces the standard library's own behavior, making concrete the chapter's point that C strings carry no separately stored length field; both functions have to find it the same way, by scanning.