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
What is pass by reference in functions?
Explain what is operator promotion?
What is difference between stdio h and conio h?
C language questions for civil engineering
When would you use a pointer to a function?
When should structures be passed by values or by references?
Explain how can I avoid the abort, retry, fail messages?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
Is c is a middle level language?
C program to find all possible outcomes of a dice?
please give me some tips for the placement in the TCS.
Explain what is the difference between #include and #include 'file' ?
Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.
What is equivalent to ++i+++j?
Why dont c comments nest?