fn f(x)

{ if(x<=0)
return;
else f(x-1)+x;
}

Answers were Sorted based on User's Feedback



fn f(x) { if(x<=0) return; ..

Answer / guest

fn(5)
i guess

Is This Answer Correct ?    16 Yes 2 No

fn f(x) { if(x<=0) return; ..

Answer / jai

15

Is This Answer Correct ?    4 Yes 1 No

fn f(x) { if(x<=0) return; ..

Answer / gupta

x(x+1)/2

Is This Answer Correct ?    4 Yes 1 No

fn f(x) { if(x<=0) return; ..

Answer / kamal

f(x-1)+x

Is This Answer Correct ?    2 Yes 1 No

fn f(x) { if(x<=0) return; ..

Answer / hari

ans is 16384

for further queries and discussions, just check these out !!!

http://forum.campusmaniac.com/
http://www.campusmaniac.com/

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More C Interview Questions

who did come first hen or agg

15 Answers   Infosys,


parkside's triangle.. create a program like this.. enter the size: 6 enter the seed: 1 output: 1 23 456 7891 23456 789123 sample2: enter the size: 5 enter the seed: 3 output: 3 45 678 9123 45678 parkside should not exceed 10 while its seed should only be not more than 9..

4 Answers  


What is clrscr in c?

0 Answers  


Why is it important to memset a variable, immediately after allocating memory to it ?

0 Answers  


how to introdu5ce my self in serco

0 Answers  






why ordinary variable store the later value not the initial

1 Answers  


wht is the difference between KPO and BPO ?

2 Answers   Accenture, BPO, HCK, HCL, Infosys,


What is hash table in c?

0 Answers  


Array is an lvalue or not?

0 Answers  


How do we declare variables in c?

0 Answers  


Program to find the sum of digits of a given number until the sum becomes a single digit

8 Answers   InterGraph,


Is double link list a linear data structure? If Yes, Why?If No, Why?

4 Answers  


Categories