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 NULL pointer?

0 Answers   Infosys,


What is floating point exception error? And what are different types of errors occur during compile time and run time? why they occur?

1 Answers  


how i m write c program 1.check prime number 2.prime number series

1 Answers  


What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

0 Answers  


Write the program for displaying the ten most frequent words in a file such that your program should be efficient in all complexity measures.

3 Answers   Google,






Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)

0 Answers  


Write a main() program that calls this function at least 10 times. Try implementing this function in two different ways. First, use an external variable to store the count. Second, use a local variable. Which is more appropriate?

2 Answers  


I have a varargs function which accepts a float parameter?

0 Answers  


I use turbo C which allocates 2 bytes for integers and 4 bytes for long. I tried to declare array of size 500000 of long type using the following code... long *arr; arr=(long *)(malloc)(500000 * sizeof(long)); It gives a warning that "Conversion may lose significant digits in function main"... And the resulting array size was very less around 8400 as compared to 500000. Any suggestions will be welcomed....

2 Answers  


what is difference between #include<stdio.h> and #include"stdio.h"

4 Answers  


printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions

0 Answers  


Write a program to print fibonacci series without using recursion?

0 Answers  


Categories