which is faster execution: loops or recursion?
Answers were Sorted based on User's Feedback
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 |
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 |
What is the purpose of 'register' keyword?
I didn't count the ducks that I saw in line, but I do remember that one duck was in front of two ducks, another duck behind two ducks. How many ducks did I see?
Find Error if any in below code, Justify ur answer: struct xx { int a; struct yy { char c; struct xx* p; } struct yy* q; }
How will you divide two numbers in a MACRO?
What is the hardest programming language?
What is the Difference between Macro and ordinary definition?
3 Answers Bosch, Cognizant, College School Exams Tests, Motorola,
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
how to write palindrome program?
Explain what’s a signal? Explain what do I use signals for?
What are structures and unions? State differencves between them.
What is a wrapper function in c?
write a c program to calculate the income tax of the employees in an organization where the conditions are given as. (I.T. = 0 if income <100000 I.T = 10% if income _< 200000 it = 20% if income >_ 200000)
7 Answers Consultancy, DBU, FD, JK Associates, Kobe, Satyam,