Consider the following function:
int more_recursive_fun(const char *s, char t) {
if (s[0] == '\0') {
return 0;
}
else if (s[0] == t) {
return 1 + more_recursive_fun(s + 1,
t);
}
else {
return more_recursive_fun(s +
1, t);
}
}
In general terms, what does this function do? You only need to
describe what the function does, not how it does it.
Consider the following function: int more_recursive_fun(const char *s, char t) { if (s[0] == '\0') { return 0; } else if
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Consider the following function: int more_recursive_fun(const char *s, char t) { if (s[0] == '\0') { return 0; } else if
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!