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
What are valid operations on pointers?
What is the difference between a function and a method in c?
Explain Basic concepts of C language?
Explain low-order bytes.
Compare and contrast compilers from interpreters.
Can you please explain the difference between syntax vs logical error?
What is a void * in c?
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
What is the difference between #include and #include 'file' ?
What are integer variable, floating-point variable and character variable?
what is the syallabus of computer science students in group- 1?
Can you write the function prototype, definition and mention the other requirements.
How do you view the path?
What is this pointer in c plus plus?
What is a nested loop?