What is the output of the following code fragment?

int f1(int x, int y)
{
if(x<0 || y<0)
return x-y;
else
return f1(x-1,y) + f1(x,y-1);
}
int main()
{
cout << f1(1,2)< return 0;
}
a. 0
b. -1
c. 5
d. -5

d. -5

Computer Science & Information Technology

You might also like to view...

A code that creates a link to a video, picture, or other type of rich media content

a. embed code b. interactive code c. address code

Computer Science & Information Technology

Which of the following broadband WAN technologies would MOST likely be used to connect several remote branches that have no fiber or satellite connections?

A. OC12 B. POTS C. WiMax D. OC3

Computer Science & Information Technology