what are the advantage and disadvantage of recursion

Answer Posted / vadivelt

Recursion will be useful when same kind of job has to be
continued for a finite no input or time.

Eg: calculating series, finding factorial etc..

Disadvantage would be,
1.Hard to analyse or understand the code.
2.If the recursive function is called for infinite no of
times and memory constrains are not taken care, then stack
overflow may occur So system may crash.

Is This Answer Correct ?    52 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?

1862


to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?

1575


Explain how can you check to see whether a symbol is defined?

665


Why is c platform dependent?

626


Explain what is wrong with this program statement?

625






If I have a char * variable pointing to the name of a function ..

659


What is difference between static and global variable in c?

541


What is the correct declaration of main?

681


Is there a way to switch on strings?

623


What is graph in c?

587


Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.

1731


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

596


What does main () mean in c?

618


What is the value of c?

576


When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd

646