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
In a header file whether functions are declared or defined?
Explain about the functions strcat() and strcmp()?
Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?
Explain what is the benefit of using #define to declare a constant?
What is c method?
What is c basic?
Can you please explain the difference between malloc() and calloc() function?
Difference between Function to pointer and pointer to function
What is a class c rental property?
Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.
Write a program to swap two numbers without using third variable?
Can a program have two main functions?
if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.
Why is c known as a mother language?
what is the structure pointer?