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



1)what are limitations for recursive function? 2)write a program to read a text file and count the ..

Answer / 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

More C Interview Questions

Do you know what are the properties of union in c?

0 Answers  


Identify the correct argument for the function call fflush () in ANSI C: A)stdout B)stdin C)stderr D)All the above

5 Answers   Accenture, TCS,


All technical questions

0 Answers   TCS,


Is malloc memset faster than calloc?

0 Answers  


#include<stdio.h> int main() { int i=2; int j=++i + ++i + i++; printf("%d\n",i); printf("%d\n",j); }

15 Answers   Infosys,


write a program to remove duplicate from an ordered char array? in c

2 Answers  


What are the types of pointers?

0 Answers  


how to implement stack work as a queue?

2 Answers  


Tell me what is the purpose of 'register' keyword in c language?

0 Answers  


What is the explanation for the dangling pointer in c?

0 Answers  


What is meant by gets in c?

0 Answers  


Tell us the use of fflush() function in c language?

0 Answers  


Categories