recategorized by
3,449 views

1 Answer

Best answer
4 votes
4 votes
The answer is A.) 2550

The given function is a recursive function which takes starting value as 100. It keeps on adding the present value and the value obtained by calling the function f(n-2) where n is current value. It stops at n=0 where it returns 0.

As a result, it forms an AP starting with first term as 2 and last term as 100 with 2 common difference and total terms as 50.

So applying Sum of AP, we get :-

S= (n*(a+l))/2 = (50*(2+100))/2 = 2550
selected by
Answer:

Related questions

4 votes
4 votes
2 answers
1
go_editor asked Aug 14, 2016
3,797 views
Given i=0, j=1, k=-1, x=0.5, y=0.0, what is the output of the following expression in C language?x*y<i+j $\mid \mid$k-1012
4 votes
4 votes
2 answers
2
4 votes
4 votes
1 answer
3