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

What is union and structure in c?

0 Answers  


Is c still used?

0 Answers  


main() { printf(5+"good morning"); printf("%c","abcdefgh"[4]); }the o/p is morning and e...how someone explain

1 Answers  


What is a good way to implement complex numbers in c?

0 Answers  


difference between semaphores and mutex?

1 Answers  






Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?

0 Answers  


What are data breakpoints?

3 Answers   Adobe,


Why does this code crash?

0 Answers  


how to print "hai" in c?

13 Answers   TCS,


Explain the binary height balanced tree?

0 Answers  


What is a class?

3 Answers  


Write a program which take a integer from user and tell whether the given variable is squar of some number or not. eg: is this number is 1,4,9,16... or not

9 Answers   Alcatel,


Categories