Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are advantages and disadvantages of recursive
calling ?

Answer Posted / sachin mahajan

Advantages:
Through Recursion one can Solve problems in easy way while
its iterative solution is very big and complex.
Ex : tower of Hanoi
You reduce size of the code when you use recursive call.

Disadvantages :
Recursive solution is always logical and it is very
difficult to trace.(debug and understand)

Before each recursive calls current values of the varibles
in the function is stored in the PCB, ie process control
block and this PCB is pushed in the OS Stack.
So sometimes alot of free memory is require for recursive
solutions.

Remember : whatever could be done through recursion could be
done through iterative way but reverse is not true.

Is This Answer Correct ?    103 Yes 30 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between Structure and Unions?

1252


What are c preprocessors?

1185


Where static variables are stored in c?

1107


What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?

1428


Is linux written in c?

1038


What is nested structure in c?

1060


Which type of language is c?

1074


How do I create a directory? How do I remove a directory (and its contents)?

1170


Write a C program in Fibonacci series.

1092


Write program to remove duplicate in an array?

1079


What is array of structure in c?

1174


How many types of operator or there in c?

1095


Without Computer networks, Computers will be half the use. Comment.

2296


Why is c fast?

1058


Define circular linked list.

1028