what are the advantage and disadvantage of recursion
Answer Posted / vadivelt
Recursion will be useful when same kind of job has to be
continued for a finite no input or time.
Eg: calculating series, finding factorial etc..
Disadvantage would be,
1.Hard to analyse or understand the code.
2.If the recursive function is called for infinite no of
times and memory constrains are not taken care, then stack
overflow may occur So system may crash.
| Is This Answer Correct ? | 52 Yes | 7 No |
Post New Answer View All Answers
What are the two types of functions in c?
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What is signed and unsigned?
When is a “switch” statement preferable over an “if” statement?
what is a function method?give example?
Why void is used in c?
Are enumerations really portable?
Explain what is a const pointer?
Is there sort function in c?
What is pointers in c?
Can you please compare array with pointer?
What is sizeof array in c?
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
What is page thrashing?
What is the advantage of using #define to declare a constant?