How is recursion handled internally, Computer Engineering

Assignment Help:

How is recursion handled internally?

Internally, every recursive call to a function requires storing the intermediate values of the parameters and local variables in a run time stack. The common algorithm for any recursive procedure having the following steps:

 1. Save the parameters, local variables and return address.

 2. If the base criterion has been arrived, then perform the final computation and go to step 3, or else perform the partial computation and go to step 1 with condensed parameter values (initiate a recursive call).

 3. Restore the most newly saved parameters, local variables and return address. Go to this return address.

 


Related Discussions:- How is recursion handled internally

The types of parameters in the function modules, What are the types of para...

What are the types of parameters in the function modules? In general, function module can have four types of parameters: EXPORTING : for passing data to the called function

Explain is cgi a script or a program, The distinction is semantic. Traditio...

The distinction is semantic. Traditionally, compiled executables (binaries) are known as programs, and interpreted programs are usually known as scripts. In the context of CGI, the

Difference between write back and write through cache, What is Difference b...

What is Difference between write back and write through cache? A caching method wherein modifications to data into the cache aren't copied to the cache source till absolutely n

Functions employed for messaging passing, Q. Functions employed for messagi...

Q. Functions employed for messaging passing? The functions employed for messaging passing are: int MPI_Send(void *msgaddr, int count, MPI_Datatype datatype, int dest, int ta

Give difference between top down and bottom up parsing, Give difference bet...

Give difference between top down parsing and bottom up parsing. Top down parsing: Specified an input string, top down parsing tries to derive a string identical to this by s

Applications of generic framework for electronic commerce, How are the appl...

How are the applications of generic framework for electronic commerce performed? To perform applications, this is essential to have Supporting Information and Organizational In

Discuss in detail table management techniques, Discuss in detail Table mana...

Discuss in detail Table management Techniques? An Assembler uses the subsequent tables: OPTAB: Operation Code Table consists of mnemonic operation code and machine langua

Operating characteristics for master-slave s-r flip-flop, Define the Operat...

Define the Operating Characteristics for master-slave S-R flip-flop? 1. Propagation Delay Time - is the interval of time required subsequent to an input signal has been applied

Differences between asp and asp .net, What are the differences between ASP ...

What are the differences between ASP and ASP .Net ?    1. ASP: Code is Interpreted ASP.NET: Code is Compiled 2. ASP: Business Logic and Presentation Logic are in a one

What is base register addressing, Q. What is Base Register Addressing ? ...

Q. What is Base Register Addressing ? An addressing technique in which content of an instruction specifies base register is added to address field or displacement field of the

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd