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 is an array? What the different types of arrays in c?
Are pointers really faster than arrays?
Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?
Explain the process of converting a Tree into a Binary Tree.
What are types of functions?
Differentiate between calloc and malloc.
What is a void pointer? When is a void pointer used?
Why is it that not all header files are declared in every C program?
Can we increase size of array in c?
How can I ensure that integer arithmetic doesnt overflow?
What is the difference between %d and %i?
What is #pragma statements?
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
What math functions are available for integers? For floating point?
Explain what are the advantages and disadvantages of a heap?