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

Where is c used?

652


code for quick sort?

1624


How to declare pointer variables?

688


how should functions be apportioned among source files?

627


What is the difference between int main and void main in c?

595






how to introdu5ce my self in serco

1525


What are the types of bitwise operator?

667


What is the use of extern in c?

651


Explain what is meant by 'bit masking'?

646


What is wrong with this program statement?

610


Explain setjmp()?

661


What are the advantages of c preprocessor?

715


what is stack , heap ,code segment,and data segment

2225


What is character set?

687


What is #define?

578