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

main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??

19 Answers   EBS, Ramco, Sangwin, TCS,


How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST

6 Answers   Adobe, Huawei,


atoi, which takes a string and converts it to an integer. write a program that reads lines(using getline), converts each line to an integer using atoi and computes the average of all the numbers read. also compute the standard deviation

0 Answers  


what is pointer?

13 Answers   HCL, TCS,


What is string function c?

0 Answers  






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

0 Answers  


What is the use of printf() and scanf() functions?

0 Answers  


main() { int i; printf("%d",scanf"%d",&i))//if the input is 12 24 34 then wat will be the output }

2 Answers  


what is a function method?give example?

0 Answers  


What does double pointer mean in c?

0 Answers  


what is the difference between #include<> and #include”…”?

5 Answers  


Why do we use header files in c?

0 Answers  


Categories