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


Please Help Members By Posting Answers For Below Questions

What are valid operations on pointers?

662


What is the difference between a function and a method in c?

558


Explain Basic concepts of C language?

640


Explain low-order bytes.

619


Compare and contrast compilers from interpreters.

679






Can you please explain the difference between syntax vs logical error?

691


What is a void * in c?

589


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)

1862


What is the difference between #include and #include 'file' ?

602


What are integer variable, floating-point variable and character variable?

603


what is the syallabus of computer science students in group- 1?

1836


Can you write the function prototype, definition and mention the other requirements.

656


How do you view the path?

661


What is this pointer in c plus plus?

590


What is a nested loop?

643