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
Differentiate between the expression “++a” and “a++”?
Is it possible to use curly brackets ({}) to enclose single line code in c program?
How will you write a code for accessing the length of an array without assigning it to another variable?
I heard that you have to include stdio.h before calling printf. Why?
What is union and structure in c?
The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.
What are loops c?
Which driver is a pure java driver
What is typedef example?
Write a program to check armstrong number in c?
List some applications of c programming language?
What are the differences between new and malloc in C?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
why programs in c are running with out #include
Is c is a high level language?