what are the advantage and disadvantage of recursion

Answer Posted / satyabrata nayak

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 ?    23 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to establish connection with oracle database software from c language?

1941


a c code by using memory allocation for add ,multiply of sprase matrixes

2541


what do you mean by enumeration constant?

794


What is c standard library?

918


What is the difference between mpi and openmp?

1004


What is the general form of a C program?

793


Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers

1656


What is 'bus error'?

874


Explain what are the __date__ and __time__ preprocessor commands?

866


Array is an lvalue or not?

864


What is volatile variable in c?

871


simple program of graphics and their output display

1711


will u please send me the placement papers to my mail???????????????????

1626


What is the use of static variable in c?

826


Is c still relevant?

852