what are the advantage and disadvantage of recursion
Answer Posted / satyabrata nayak
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 ? | 23 Yes | 6 No |
Post New Answer View All Answers
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
What is the difference between printf and scanf )?
Is that possible to add pointers to each other?
How can I direct output to the printer?
write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);
Write a program to check armstrong number in c?
How is a null pointer different from a dangling pointer?
Explain what are the __date__ and __time__ preprocessor commands?
Explain what is the difference between #include and #include 'file' ?
Suggesting that there can be 62 seconds in a minute?
Explain how can I right-justify a string?
What does %p mean c?
Explain how does flowchart help in writing a program?
How can I find out if there are characters available for reading?
Disadvantages of C language.