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 the function of volatile in c language?

1135


Explain the difference between exit() and _exit() function?

1173


How does placing some code lines between the comment symbol help in debugging the code?

1003


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

1974


Write a program to swap two numbers without using a temporary variable?

1128


What is void pointers in c?

1008


Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given

3065


What is n in c?

1057


write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?

2138


any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above

1053


How can you allocate arrays or structures bigger than 64K?

1148


What is the use of a conditional inclusion statement in C?

1068


Who invented b language?

1419


What is sizeof array in c?

1062


Explain what are the different data types in c?

1225