0 votes
75 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 87 views
0 votes
1 answer 68 views
0 votes
1 answer 174 views
0 votes
1 answer 339 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.
...