What are advantages and disadvantages of recursive
calling ?

Answer Posted / ganesh narayanan

advantage : A recursive definition defines an object in simpler cases of itself reducing nested looping complexity

disadvantage : less efficient as compared to the non-recursive counterparts as the overhead involved in entering,re-entering and exiting a block is avoided in case of the non recursive forms. its also possible to identify a number of local variables which need not be saved and restored with the help of stacks and this unwanted stacking activity is avoided in the non-recursive versions.

Is This Answer Correct ?    26 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Between macros and functions,which is better to use and why?

1559


Why ca not I do something like this?

580


formula to convert 2500mmh2o into m3/hr

485


Can you apply link and association interchangeably?

661


What is keyword with example?

619






What is || operator and how does it function in a program?

616


What is "Hungarian Notation"?

627


int far *near * p; means

3106


How do I copy files?

612


What are reserved words?

637


Is c is a high level language?

605


Describe the difference between = and == symbols in c programming?

763


What are extern variables in c?

537


write a program to create a sparse matrix using dynamic memory allocation.

4361


What is bss in c?

590