The birthday cake gets a message in icing, one squeeze per character (spaces too). Write name_length(name) to count the characters in name without using strlen. An empty string gives 0.
name_length("Happy Birthday")→14name_length("")→0int name_length(const char *name)int name_length(const char *name) {
int n = 0;
for (int i = 0; name[i] != '\0'; i++) {
// your code here: for each character you pass, add 1 to n
}
return n;
}
Run tries the examples. When they look right, Submit.