Question
Asked by:
jvorheze
jvorheze from Hard Knocks
Rating : No Rating
Questions Asked: 31
Tutorials Posted: 0
 

$1.00 programming in c help asap please

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
 
nzpapillon asked: The code appears to have some symbols or parts missing. Can you post an attachment of this and the other unanswered questions so that we do not generate solutions to possibly incomplete code or questions.
To which jvorheze said: For which one are you talking about.
Want to take a stab at the bounty and post a tutorial? Need clarification? Join us now or log in! Read more on how this works.
 
Available Tutorials to this Question
Posted by:
nzpapillon
nzpapillon from Delamasa Computer Centre
Rating (20): B+
Questions Asked: 0
Tutorials Posted: 135, earned $213.25
 

$1.00 Here we go

  • This tutorial was purchased 1 time and rated A+ by students like you.
  • Posted on Dec 03, 2008 at 10:46:11PM
A:
Preview: ... (the first if), increments the subtotal of digits encountered so far (just after the "else if") and does not incre ...

The full tutorial is about 97 words long .
   
Join Now or Log In
Get Tutoring
Get Paid
Academic Honesty