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 is the basic structure of c?

567


How can I do peek and poke in c?

631


a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above

692


define string ?

676


The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference

681






Which header file is essential for using strcmp function?

951


What are the two types of structure?

588


What is the difference between procedural and declarative language?

665


What are the keywords in c?

651


What are the different types of endless loops?

633


Why is structure important for a child?

610


Why c is called procedure oriented language?

589


In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]

1967


Give the rules for variable declaration?

686


When can you use a pointer with a function?

578