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 atoi and atof in c?

0 Answers  


how to write a bubble sort program without using temporary variable?

1 Answers   Aricent,


Does sprintf put null character?

0 Answers  


read the folllowing code # define MAX 100 # define MIN 100 .... .... if(x>MAX) x=1; else if(x<MIN) x=-1; x=50; if the initial value of x=200,what is the vlaue after executing this code? a.200 b.1 c.-1 d.50

4 Answers   TCS,


write a C code To reverse a linked list

2 Answers   Motorola, Wipro,






Array is an lvalue or not?

0 Answers  


c programming of binary addition of two binary numbers

4 Answers  


prototype of sine function.

2 Answers   Cadence,


How to print "I Love My India" without using semi colon?

4 Answers  


main() { int a=0; if(a=0) printf("Ramco Systems\n"); printf("India\n"); } output?

7 Answers   Ramco,


Write code for finding depth of tree

2 Answers   Adobe,


What's wrong with "char *p; *p = malloc(10);"?

5 Answers  


Categories