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

Why isnt any of this standardized in c?

1019


What is the full form of getch?

1176


What is the ANSI C Standard?

1206


How do you define a function?

968


What is the difference between memcpy and memmove?

967


Can a pointer be static?

1015


regarding pointers concept

1974


What are the types of data structures in c?

1077


hi any body pls give me company name interview conduct "c" language only

2228


why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above

1066


Explain output of printf("Hello World"-'A'+'B'); ?

1428


How can I find the modification date of a file?

1211


Write a program to reverse a given number in c?

977


How can I sort a linked list?

958


Write a code on reverse string and its complexity.

978