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
Is there a way to switch on strings?
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above
Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.
What is gets() function?
What is the easiest sorting method to use?
Explain what is wrong with this program statement?
write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1
can anyone please tell about the nested interrupts?
How can you call a function, given its name as a string?
What is #line?
What is the use of define in c?
Write a code to generate a series where the next element is the sum of last k terms.
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?
How can I get the current date or time of day in a c program?
What does it mean when the linker says that _end is undefined?