// calculate the length of a string using a strlen like function #include int my_strlen(char *s); int main(void) { int i = my_strlen("Hello Andrew"); printf("%d\n", i); return 0; } int my_strlen(char *s) { int length = 0; while (*s != 0) { length++; s++; } return length; }