0 votes
93 views
in General by (0 points)
closed by
Consider the following recursive method
public int foo(int x, int y) {
 if(x == y) return 0;
 else return foo(x-1, y)+1;
}
If the method is called as foo(8, 3), what is returned?
a. 11
b. 8
c. 5
d. 3
closed

1 Answer

0 votes
by (0 points)
 
Best answer
c

Related questions

0 votes
1 answer 121 views
0 votes
1 answer 97 views
0 votes
1 answer 198 views
0 votes
1 answer 396 views

3.0k questions

3.0k answers

0 comments

76 users

Welcome to MCQ Village Q&A, where you can ask questions and receive answers from other members of the community.
...