Question
Asked by:
$1.00 programming in c help asap please
- From Computer-Science: General-CS
- Due on Dec. 03, 2008
- Asked on Dec 02, 2008 at 9:37:02PM
Q:
What does function five do?
int five(const char *str)
{
int ans;
if (str[0] == '\0')
ans = 0;
else if (isdigit(str[0]))
ans = 1 + five(''and symbol'' str[1]);
else
ans = five(''and symbol'' str[1]);
return (ans);
}
a. counts the number of digits in str
b. returns 1 if first character is a digit, 5 otherwise
c. counts the number of null characters in str
d. counts the number of characters in str
e. none of the above
To which jvorheze said: For which one are you talking about.


