1)what are limitations for recursive function?
2)write a program to read a text file and count the number of characters in the text file
Answer Posted / mubin ahmed shaik
Limitations of Recursive Approach:
1. Recursive solutions may involve extensive overhead because they use function calls. Each function call requires push of return memory address, parameters, returned result,etc. and every function return requires that many pops.
2. Each time you call a function you use up some of your memory allocation may be in stack or heap. If there are large number of recursive calls – then you may run out of memory.
| Is This Answer Correct ? | 15 Yes | 4 No |
Post New Answer View All Answers
How do you define CONSTANT in C?
What is the use of ?: Operator?
In C language what is a 'dangling pointer'?
What is meant by 'bit masking'?
Explain what are compound statements?
Why is c used in embedded systems?
What is the explanation for prototype function in c?
How do c compilers work?
What is logical error?
How can I convert a number to a string?
Why is c called a structured programming language?
What are dangling pointers? How are dangling pointers different from memory leaks?
What is a double c?
What is a pointer in c plus plus?
What is the best way of making my program efficient?