what are the advantage and disadvantage of recursion

Answer Posted / jyoti singh

Advantages of recursion:-
1.Recursion is more efficient if the program using recursion is run on computer with multiprocessing facilities.
2.It is very useful in solving the data structure problems.
3. It is easily, simple and understandable.

Disadvantages of recursion:-
1. It requires more memory because recursive calls along with automatic variables are stored on the stack.
2.The computer may run out of memory if recursive calls are not properly checked.

Is This Answer Correct ?    15 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the two types of structure?

813


Why does the call char scanf work?

883


Explain Function Pointer?

896


What are preprocessor directives in c?

842


With the help of using classes, write a program to add two numbers.

842


I have a varargs function which accepts a float parameter?

795


How to declare a variable?

768


What are variables and it what way is it different from constants?

1006


Explain the array representation of a binary tree in C.

950


Can you pass an entire structure to functions?

907


How can I call a function with an argument list built up at run time?

915


What does int main () mean?

772


‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.

2083


What is volatile variable in c?

863


What is void main ()?

808