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

Is c procedural or object oriented?

1 Answers  


The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?

1 Answers  


difference between my-strcpy and strcpy ?

3 Answers   Geometric Software, IIM, Infosys,


Is fortran faster than c?

1 Answers  


How to write in a function declaration and in function call in which the function has 'n' number of varible or arguments?

2 Answers  


why we are using semicolon at the end of printh statment

2 Answers   HCL,


What is the equivalent code of the following statement in WHILE LOOP format?

1 Answers  


What is the Purpose of 'extern' keyword in a function declaration?

1 Answers  


Describe the steps to insert data into a singly linked list.

1 Answers  


How do I read the arrow keys? What about function keys?

1 Answers  


What are directives in c?

1 Answers  


15.what is the disadvantage of using macros? 16.what is the self-referential structure? 17.can a union be self-referenced? 18.What is a pointer? 19.What is the Lvalue and Rvalue? 20.what is the difference between these initializations? 21.Char a[]=”string”; 22.Char *p=”literal”; 23.Does *p++ increment p, or what it points to?

2 Answers   CTS,


Categories