which is faster execution: loops or recursion?

Answers were Sorted based on User's Feedback



which is faster execution: loops or recursion?..

Answer / saran3589

loops

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

Why we use conio h in c?

0 Answers  


i have a written test for microland please give me test pattern

0 Answers   Microland,


can we declare a function in side the structure?

2 Answers   HCL,


How many levels of pointers have?

0 Answers  


Write a program to print fibonacci series without using recursion?

0 Answers  


what is the return type of printf

3 Answers  


The operation of a stair case switch best explains the a) or operation b) and operation c)exclusive nor operation d)exclusive or operation Which of the following is/are syntactically correct? a) for(); b) for(;); c) for(,); d) for(;;);

1 Answers   HCL, Public Service Commission,


Can u return two values using return keyword? If yes, how? If no, why?

7 Answers  


What is default value of global variable in c?

0 Answers  


write a C program to print the program itself ?!

16 Answers   TCS,


What is new line escape sequence?

0 Answers  


What is the difference between functions abs() and fabs()?

0 Answers  


Categories