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 typedf?

907


What are the rules for identifiers in c?

846


List some applications of c programming language?

764


What is else if ladder?

822


how to find anagram without using string functions using only loops in c programming

2968


what is the basis for selection of arrays or pointers as data structure in a program

4075


What's the right way to use errno?

885


What does volatile do?

781


How can I access an I o board directly?

868


What is scope and lifetime of a variable in c?

814


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

934


what is the syallabus of computer science students in group- 1?

2103


What are the c keywords?

989


Explain enumerated types in c language?

823


Write a program to print ASCII code for a given digit.

916