104. Strings and Character Handling-i

Question.2

A developer implements a custom strlen:

int my_strlen(const char *s) {
   int len = 0;
   while (s[len] != '\0') len++;
   return len;
}

He calls it on two strings:

printf("%d", my_strlen("Embed"));
printf(" %d", my_strlen(""));

What is the output?

Need Help? Refer to the Quick Guide below

Select Answer