which is faster execution: loops or recursion?

Answers were Sorted based on User's Feedback

which is faster execution: loops or recursion?..

Answer / saran3589


Is This Answer Correct ?    16 Yes 2 No

which is faster execution: loops or recursion?..

Answer / nipa

loop is faster then recursion. because in recursion several
time function call itself, so it take time to pass control
to function and return value, but in loop control not pass
in other function it work in same function.here we consider
that function and loop contain same number of statement.

Is This Answer Correct ?    4 Yes 0 No

which is faster execution: loops or recursion?..

Answer / sight

It's not necessary that every time faster loops only because
it's depends upon the problem.....
On this we take decision that it's faster working with loop
or recursion....

Is This Answer Correct ?    6 Yes 4 No

Post New Answer

More C Interview Questions

writ a program to compare using strcmp VIVA and viva with its output.

0 Answers  

Write a C program to perform some of the operation which can be performed using Single linked list

1 Answers   Qualcomm,

How to swap two values using a single variable ? condition: Not to use Array and Pointer ?

6 Answers  

void main() { int i=5; printf("%d",i++ + ++i); }

21 Answers   ME,

hOW Can I add character in to pointer array of characters char *a="indian"; ie I want to add google after indian in the char *a

1 Answers  

in linking some of os executables are linking name some of them

0 Answers   IBM,

how to get the starting address of file stored in harddisk through 'C'program.

2 Answers   Siemens,

in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?

11 Answers   IBM,

why we need function pointers?

3 Answers  

please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code

0 Answers   Mind Tree,

how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n");

9 Answers   TCS,

application attempts to perform an operation?

0 Answers