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 |
sqrt(x+sqrt(x+sqrt(x+sqrt(x))))=2; Find the value of x?
write the function int countchtr(char string[],int ch);which returns the number of timesthe character ch appears in the string. for example the call countchtr("she lives in Newyork",'e') would return 3.
What is the use of typedef in structure in c?
find largest element in array w/o using sorting techniques.
What is FIFO?
Explain bit masking in c?
write a program that explain #define and # undef directive
What is structure in c language?
What are different types of pointers?
write a program for 4 4 3 3 3 3 2 2 2 2 2 2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 4 4
write a 'c' program to sum the number of integer values
What is meaning of tree