84.9k views
3 votes
Nt foo(int n){

if (n < 1){
return 0;
} else {
return 1 + foo(n / 10);
}
}



What values are returned as a result of the following different calls to foo?

call return value
foo(0)
unanswered
foo(1)
unanswered
foo(10)
unanswered
foo(234)
unanswered
foo(1234)
unanswered

User Nanoman
by
4.7k points

2 Answers

2 votes

Answer: foot3261

Step-by-step explanation:

User SubRed
by
4.0k points
4 votes

Answer:

I think it would be foot3261

Step-by-step explanation:

Hopefully I am right

User CJW
by
4.3k points