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

Can you please compare array with pointer?

0 Answers  


There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.

1 Answers   HCL, iGate,


What are the different types of constants?

0 Answers  


write the function int countchtr(char string[],int ch);which returns the number of timesthe character ch appears in the string. for example the call countchtr("she lives in Newyork",'e') would return 3.

6 Answers  


hi, which software companys will take,if d candidate's % is jst 55%?

0 Answers  






What is queue in c?

0 Answers  


What is file in c preprocessor?

0 Answers  


Write a C Program to display the following menu: Menu 1. Display 2. Copy 3. Append 4. Exit Accept the choice (1-4) from the user, and perform the following tasks: Choice 1: Accept a file name from the user and display the file on screen Choice 2: Accept two file names, and copy first file to the second Choice 3: Accept two file names, and append second file to the first file Choice 4: Terminate the program

1 Answers   Accenture, Concor, DMU, Satyam, Syntel, Tora,


What is #error and use of it?

0 Answers  


Lists the benefits of c programming language?

0 Answers  


What is difference between arrays and pointers?

0 Answers  


How can you read a directory in a C program?

0 Answers  


Categories